summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk8
1 files changed, 3 insertions, 5 deletions
diff --git a/cfg.mk b/cfg.mk
index 7dc1a20c8..ab0b8a4b6 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -581,11 +581,9 @@ sc_space_before_open_paren:
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
# Use STREQ_LEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
sc_prohibit_strncmp:
- @grep -nE '! *str''ncmp *\(|\<str''ncmp *\(.+\) *[!=]=' \
- $$($(VC_LIST_EXCEPT)) \
- | grep -vE ':# *define STR(N?EQ_LEN|PREFIX)\(' && \
- { echo '$(ME): use STREQ_LEN or STRPREFIX instead of str''ncmp' \
- 1>&2; exit 1; } || :
+ @prohibit='^[^#].*str''ncmp *\(' \
+ halt='use STREQ_LEN or STRPREFIX instead of str''ncmp' \
+ $(_sc_search_regexp)
# Enforce recommended preprocessor indentation style.
sc_preprocessor_indentation: