]> granicus.if.org Git - onig/commitdiff
reduce code
authorK.Kosako <kosako@sofnec.co.jp>
Thu, 29 Jun 2017 05:27:12 +0000 (14:27 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 29 Jun 2017 05:27:12 +0000 (14:27 +0900)
src/regcomp.c

index 2a96a66f06deb9f6079b2470059e0fd2105438c4..924eb7f61072be2ae529d29b7e17ac9b0f942949 100644 (file)
@@ -1999,6 +1999,10 @@ numbered_ref_check(Node* node)
     } while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node)));
     break;
 
+  case NODE_ANCHOR:
+    if (IS_NULL(NODE_BODY(node)))
+      break;
+    /* fall */
   case NODE_QTFR:
   case NODE_ENCLOSURE:
     r = numbered_ref_check(NODE_BODY(node));
@@ -2009,11 +2013,6 @@ numbered_ref_check(Node* node)
       return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
     break;
 
-  case NODE_ANCHOR:
-    if (IS_NOT_NULL(NODE_BODY(node)))
-      r = numbered_ref_check(NODE_BODY(node));
-    break;
-
   default:
     break;
   }