[Groonga-commit] groonga/groonga at 0ee8c0c [master] Use struct initializer

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Feb 5 17:53:22 JST 2016


Kouhei Sutou	2016-02-05 17:53:22 +0900 (Fri, 05 Feb 2016)

  New Revision: 0ee8c0c0d99c4091d971cda0d97d985d80a7ac63
  https://github.com/groonga/groonga/commit/0ee8c0c0d99c4091d971cda0d97d985d80a7ac63

  Message:
    Use struct initializer
    
    Because more options may be added.

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+1 -8)
===================================================================
--- lib/proc.c    2016-02-05 17:44:38 +0900 (eadf2eb)
+++ lib/proc.c    2016-02-05 17:53:22 +0900 (7ea02a3)
@@ -7126,15 +7126,8 @@ selector_fuzzy_search(grn_ctx *ctx, grn_obj *table, grn_obj *index,
     GRN_OBJ_FIN(ctx, &inspected);
     goto exit;
   } else {
-    grn_search_optarg options;
+    grn_search_optarg options = {0};
     options.mode = GRN_OP_FUZZY;
-    options.similarity_threshold = 0;
-    options.max_interval = 0;
-    options.weight_vector = NULL;
-    options.vector_size = 0;
-    options.proc = NULL;
-    options.max_size = 0;
-    options.scorer = NULL;
     options.fuzzy.prefix_match_size = prefix_match_size;
     options.fuzzy.max_distance = max_distance;
     options.fuzzy.max_expansion = max_expansion;
-------------- next part --------------
HTML����������������������������...
Download 



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