[Groonga-commit] groonga/groonga at 80975a1 [master] Use guard if style

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Oct 4 11:14:59 JST 2013


Kouhei Sutou	2013-10-04 11:14:59 +0900 (Fri, 04 Oct 2013)

  New Revision: 80975a149b13e6802ebdff4e2578446187c456bf
  https://github.com/groonga/groonga/commit/80975a149b13e6802ebdff4e2578446187c456bf

  Message:
    Use guard if style

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+5 -2)
===================================================================
--- lib/expr.c    2013-10-04 11:12:49 +0900 (c5b4585)
+++ lib/expr.c    2013-10-04 11:14:59 +0900 (760d7dd)
@@ -4025,11 +4025,14 @@ grn_scan_info_set_query(scan_info *si, grn_obj *query)
 grn_bool
 grn_scan_info_push_arg(scan_info *si, grn_obj *arg)
 {
-  if (si->nargs < 8) {
+  if (si->nargs >= 8) {
+    return GRN_FALSE;
+  }
+
+  {
     si->args[si->nargs++] = arg;
     return GRN_TRUE;
   }
-  return GRN_FALSE;
 }
 
 void
-------------- next part --------------
HTML����������������������������...
Download 



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