[Groonga-commit] groonga/groonga at 49a9346 [master] Use guard if style

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Oct 4 11:12:22 JST 2013


Kouhei Sutou	2013-10-04 11:12:22 +0900 (Fri, 04 Oct 2013)

  New Revision: 49a9346d8b6c3c34f3f4da2d943602186cbae1cc
  https://github.com/groonga/groonga/commit/49a9346d8b6c3c34f3f4da2d943602186cbae1cc

  Message:
    Use guard if style

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+6 -1)
===================================================================
--- lib/expr.c    2013-10-04 11:10:45 +0900 (08f2fb3)
+++ lib/expr.c    2013-10-04 11:12:22 +0900 (1e7c22a)
@@ -3947,7 +3947,12 @@ scan_info *
 grn_scan_info_open(grn_ctx *ctx, int start)
 {
   scan_info *si = GRN_MALLOCN(scan_info, 1);
-  if (si) {
+
+  if (!si) {
+    return NULL;
+  }
+
+  {
     GRN_INT32_INIT(&si->wv, GRN_OBJ_VECTOR);
     GRN_PTR_INIT(&si->index, GRN_OBJ_VECTOR, GRN_ID_NIL);
     si->logical_op = GRN_OP_OR;
-------------- next part --------------
HTML����������������������������...
Download 



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