[Groonga-commit] groonga/groonga at 0ad44cb [master] pat: avoid empty "for" body

Back to archive index

naoa null+****@clear*****
Mon Feb 1 16:36:02 JST 2016


naoa	2016-02-01 16:36:02 +0900 (Mon, 01 Feb 2016)

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

  Merged 2d929d3: Merge pull request #460 from naoa/pat-fussy-search

  Message:
    pat: avoid empty "for" body

  Modified files:
    lib/pat.c

  Modified: lib/pat.c (+3 -1)
===================================================================
--- lib/pat.c    2016-02-01 16:34:25 +0900 (47d9d8c)
+++ lib/pat.c    2016-02-01 16:36:02 +0900 (bd85c66)
@@ -1423,7 +1423,9 @@ grn_pat_fuzzy_search(grn_ctx *ctx, grn_pat *pat,
       }
     }
   }
-  for (lx = 0; s < e && (len = grn_charlen(ctx, s, e)); s += len, lx++);
+  for (lx = 0; s < e && (len = grn_charlen(ctx, s, e)); s += len) {
+    lx++;
+  }
   dists = GRN_MALLOC((lx + 1) * (lx + max_distance + 1) * sizeof(uint16_t));
   if (!dists) {
     return GRN_NO_MEMORY_AVAILABLE;
-------------- next part --------------
HTML����������������������������...
Download 



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