[Groonga-commit] groonga/groonga at 1d4e8e9 [master] ii: use memset() to clear struct

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Wed Dec 28 18:50:57 JST 2016


Kouhei Sutou	2016-12-28 18:50:57 +0900 (Wed, 28 Dec 2016)

  New Revision: 1d4e8e910ba66ef92e2974ba52b74079fc6fcedf
  https://github.com/groonga/groonga/commit/1d4e8e910ba66ef92e2974ba52b74079fc6fcedf

  Message:
    ii: use memset() to clear struct
    
    It's for the case when member is newly added.

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+3 -1)
===================================================================
--- lib/ii.c    2016-12-28 18:03:35 +0900 (0c523db)
+++ lib/ii.c    2016-12-28 18:50:57 +0900 (82da095)
@@ -8238,8 +8238,10 @@ grn_ii_sel(grn_ctx *ctx, grn_ii *ii, const char *string, unsigned int string_len
   ERRCLR(ctx);
   GRN_LOG(ctx, GRN_LOG_INFO, "grn_ii_sel > (%.*s)", string_len, string);
   {
-    grn_select_optarg arg = {GRN_OP_EXACT, 0, 0, NULL, 0, NULL, NULL, 0, NULL, NULL, 0, {0}, NULL};
+    grn_select_optarg arg;
     if (!s) { return GRN_INVALID_ARGUMENT; }
+    memset(&arg, 0, sizeof(grn_select_optarg));
+    arg.mode = GRN_OP_EXACT;
     if (optarg) {
       switch (optarg->mode) {
       case GRN_OP_NEAR :
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index