[Groonga-commit] groonga/groonga at 11d4fcd [master] Use defined variable

Back to archive index

Kouhei Sutou null+****@clear*****
Sat May 9 21:11:40 JST 2015


Kouhei Sutou	2015-05-09 21:11:40 +0900 (Sat, 09 May 2015)

  New Revision: 11d4fcddfb91eb38b70d76b2083c2cbac25abcab
  https://github.com/groonga/groonga/commit/11d4fcddfb91eb38b70d76b2083c2cbac25abcab

  Message:
    Use defined variable

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+4 -3)
===================================================================
--- lib/expr.c    2015-05-09 21:10:39 +0900 (dc047c4)
+++ lib/expr.c    2015-05-09 21:11:40 +0900 (81264e5)
@@ -6166,15 +6166,16 @@ parse_script_extract_name_resolve_context(grn_ctx *ctx, efs_info *q)
   code_last = code_start + (expr->codes_curr - 1);
   switch (code_last->op) {
   case GRN_OP_GET_MEMBER :
-    if (code_last - 1 < code_start) {
-      return NULL;
-    }
     {
       unsigned int n_used_codes_for_key;
       grn_expr_code *code_key;
       grn_expr_code *code_receiver;
 
       code_key = code_last - 1;
+      if (code_key < code_start) {
+        return NULL;
+      }
+
       n_used_codes_for_key = grn_expr_code_n_used_codes(ctx,
                                                         code_start,
                                                         code_key);
-------------- next part --------------
HTML����������������������������...
Download 



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