[Groonga-commit] ranguba/rroonga at 1819c3b [master] Remove needless `NIL_P` check

Back to archive index

Masafumi Yokoyama null+****@clear*****
Sun Sep 28 18:14:18 JST 2014


Masafumi Yokoyama	2014-09-28 18:14:18 +0900 (Sun, 28 Sep 2014)

  New Revision: 1819c3bc7a3525f60bc8d6e6c6e784aa01029cd6
  https://github.com/ranguba/rroonga/commit/1819c3bc7a3525f60bc8d6e6c6e784aa01029cd6

  Merged 883cd11: Merge pull request #24 from myokoym/bind-grn-table-update

  Message:
    Remove needless `NIL_P` check
    
    Because `rb_grn_scan_options()` accepts `nil` as `options`.

  Modified files:
    ext/groonga/rb-grn-double-array-trie.c

  Modified: ext/groonga/rb-grn-double-array-trie.c (+1 -4)
===================================================================
--- ext/groonga/rb-grn-double-array-trie.c    2014-09-28 18:12:39 +0900 (6404e21)
+++ ext/groonga/rb-grn-double-array-trie.c    2014-09-28 18:14:18 +0900 (cfaf0a2)
@@ -532,12 +532,10 @@ rb_grn_double_array_trie_update (int argc, VALUE *argv, VALUE self)
 {
     grn_id id;
     VALUE rb_current_key_or_id, rb_new_key, rb_options;
-    VALUE rb_id;
+    VALUE rb_option_id, rb_id;
 
     rb_scan_args(argc, argv, "21",
                  &rb_current_key_or_id, &rb_new_key, &rb_options);
-    if (!NIL_P(rb_options)) {
-        VALUE rb_option_id;
         rb_grn_scan_options(rb_options,
                             "id", &rb_option_id,
                             NULL);
@@ -545,7 +543,6 @@ rb_grn_double_array_trie_update (int argc, VALUE *argv, VALUE self)
             rb_id = rb_current_key_or_id;
             return rb_grn_double_array_trie_update_by_id(self, rb_id, rb_new_key);
         }
-    }
 
     id = rb_grn_table_key_support_get(self, rb_current_key_or_id);
     rb_id = UINT2NUM(id);
-------------- next part --------------
HTML����������������������������...
Download 



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