[Groonga-commit] groonga/groonga at 299a987 [master] grn_pat: remove a needless variable "direction"

Back to archive index

susumu.yata null+****@clear*****
Thu Oct 15 10:49:29 JST 2015


susumu.yata	2015-10-15 10:49:29 +0900 (Thu, 15 Oct 2015)

  New Revision: 299a9871e224345b32fac1d9c726d149438b01ed
  https://github.com/groonga/groonga/commit/299a9871e224345b32fac1d9c726d149438b01ed

  Message:
    grn_pat: remove a needless variable "direction"

  Modified files:
    lib/pat.c

  Modified: lib/pat.c (+1 -3)
===================================================================
--- lib/pat.c    2015-10-15 10:39:08 +0900 (81850c9)
+++ lib/pat.c    2015-10-15 10:49:29 +0900 (819438b)
@@ -1094,7 +1094,6 @@ _grn_pat_del(grn_ctx *ctx, grn_pat *pat, const char *key, uint32_t key_size, int
              grn_table_delete_optarg *optarg)
 {
   grn_pat_delinfo *di;
-  uint8_t direction;
   pat_node *rn, *rn0 = NULL, *rno;
   int c, c0 = -1, ch;
   uint32_t len = key_size * 16;
@@ -1131,8 +1130,7 @@ _grn_pat_del(grn_ctx *ctx, grn_pat *pat, const char *key, uint32_t key_size, int
       !optarg->func(ctx, (grn_obj *)pat, r, optarg->func_arg)) {
     return GRN_SUCCESS;
   }
-  direction = (rn0->lr[1] == r);
-  otherside = direction ? rn0->lr[0] : rn0->lr[1];
+  otherside = (rn0->lr[1] == r) ? rn0->lr[0] : rn0->lr[1];
   if (rn == rn0) {
     di->stat = DL_PHASE2;
     di->d = r;
-------------- next part --------------
HTML����������������������������...
Download 



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