[Groonga-commit] groonga/groonga at 8acfde4 [master] expr: remove a meaningless condition check

Back to archive index

Susumu Yata null+****@clear*****
Tue Aug 1 14:06:21 JST 2017


Susumu Yata	2017-08-01 14:06:21 +0900 (Tue, 01 Aug 2017)

  New Revision: 8acfde4acfb53bd61bca11a0ac156ab14c818566
  https://github.com/groonga/groonga/commit/8acfde4acfb53bd61bca11a0ac156ab14c818566

  Message:
    expr: remove a meaningless condition check

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+11 -13)
===================================================================
--- lib/expr.c    2017-08-01 11:33:20 +0900 (555f52a)
+++ lib/expr.c    2017-08-01 14:06:21 +0900 (83a75a2)
@@ -6100,19 +6100,17 @@ grn_table_select_index_suffix(grn_ctx *ctx,
                               scan_info *si,
                               grn_obj *res)
 {
-  if (si->op == GRN_OP_SUFFIX) {
-    grn_obj *domain;
-    if (si->flags & SCAN_ACCESSOR) {
-      domain = table;
-    } else {
-      domain = grn_ctx_at(ctx, index->header.domain);
-    }
-    if (domain->header.type != GRN_TABLE_PAT_KEY) {
-      return GRN_FALSE;
-    }
-    if (!(domain->header.flags & GRN_OBJ_KEY_WITH_SIS)) {
-      return GRN_FALSE;
-    }
+  grn_obj *domain;
+  if (si->flags & SCAN_ACCESSOR) {
+    domain = table;
+  } else {
+    domain = grn_ctx_at(ctx, index->header.domain);
+  }
+  if (domain->header.type != GRN_TABLE_PAT_KEY) {
+    return GRN_FALSE;
+  }
+  if (!(domain->header.flags & GRN_OBJ_KEY_WITH_SIS)) {
+    return GRN_FALSE;
   }
   return grn_table_select_index_prefix(ctx, table, index, si, res);
 }
-------------- next part --------------
HTML����������������������������...
Download 



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