]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: grepc_macro_simple: Fix regex for empty macro
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 9 May 2022 12:58:37 +0000 (14:58 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:28:51 +0000 (21:28 +0100)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index 15c2b367cad0a106ee305d66720b5728267e877b..fb10366fffa950f07f58c198e080ba9bea6698c1 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -24,7 +24,7 @@ function grepc_macro_simple()
        grepc_helper '\.[ch]$' \
          "#\s*define\s+$1\b[^(]" \
          "." \
-         "(?s)#\s*define\s+$1\b[^(].*?[^\\\\]$";
+         "(?s)#\s*define\s+$1\b(?!\().*?[^\\\\]$";
 }