]> granicus.if.org Git - onig/commitdiff
refactoring
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 12 Sep 2018 01:45:32 +0000 (10:45 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 12 Sep 2018 01:45:32 +0000 (10:45 +0900)
src/regcomp.c

index c0fd8915101b37f1be16bf97ece86414ab39816d..ee534ed93596782e546f4d52fd422dbbbaec22a4 100644 (file)
@@ -2520,10 +2520,8 @@ get_head_value_node(Node* node, int exact, regex_t* reg)
       if (sn->end <= sn->s)
         break;
 
-      if (exact != 0 &&
-          !NODE_STRING_IS_RAW(node) && IS_IGNORECASE(reg->options)) {
-      }
-      else {
+      if (exact == 0 ||
+          ! IS_IGNORECASE(reg->options) || NODE_STRING_IS_RAW(node)) {
         n = node;
       }
     }