[Groonga-commit] groonga/grngo at 2f7efd5 [master] Return GRN_INVALID_ARGUMENT if the given object is not a table.

Back to archive index

susumu.yata null+****@clear*****
Fri Jul 10 16:07:37 JST 2015


susumu.yata	2015-07-10 16:07:37 +0900 (Fri, 10 Jul 2015)

  New Revision: 2f7efd5eef18fbc596e8124b2a5111a65a8e56ea
  https://github.com/groonga/grngo/commit/2f7efd5eef18fbc596e8124b2a5111a65a8e56ea

  Message:
    Return GRN_INVALID_ARGUMENT if the given object is not a table.
    
    GitHub: #12

  Modified files:
    grngo.c

  Modified: grngo.c (+1 -4)
===================================================================
--- grngo.c    2015-07-10 16:02:42 +0900 (b48f3c1)
+++ grngo.c    2015-07-10 16:07:37 +0900 (80d31a8)
@@ -25,12 +25,9 @@ grn_rc grngo_find_table(grn_ctx *ctx, const char *name, size_t name_len,
 }
 
 grn_rc grngo_table_get_name(grn_ctx *ctx, grn_obj *table, char **name) {
-  if (!ctx || !table || !name) {
+  if (!ctx || !table || !grn_obj_is_table(ctx, table) || !name) {
     return GRN_INVALID_ARGUMENT;
   }
-  if (!grn_obj_is_table(ctx, table)) {
-    return GRN_INVALID_FORMAT;
-  }
   char buf[GRN_TABLE_MAX_KEY_SIZE];
   int len = grn_obj_name(ctx, table, buf, GRN_TABLE_MAX_KEY_SIZE);
   if (len <= 0) {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index