summaryrefslogtreecommitdiff
path: root/top/maint.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-02-24 09:45:54 +0100
committerJim Meyering <meyering@redhat.com>2012-02-24 12:47:43 +0100
commit9fa1fde7810f17950543fc5b6c40d953d812a1cc (patch)
treee981759ee87ef942246ddb2c1ffdaa9dbfb516a3 /top/maint.mk
parent7b88472378ef4a201a63ccef0c07502b23287d7e (diff)
downloadgnulib-9fa1fde7810f17950543fc5b6c40d953d812a1cc.tar.gz
maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too
* top/maint.mk (sc_prohibit_strcmp): Also prohibit uses of strcmp uses with "==" *before* the call, e.g., 0 == strcmp (...) Remove now-unnecessary str''cmp obfuscation. Suggested by Akim Demaille.
Diffstat (limited to 'top/maint.mk')
-rw-r--r--top/maint.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/top/maint.mk b/top/maint.mk
index 1dd6493514..ee721de303 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -303,11 +303,12 @@ sc_prohibit_atoi_atof:
$(_sc_search_regexp)
# Use STREQ rather than comparing strcmp == 0, or != 0.
+sp_ = strcmp *\(.+\)
sc_prohibit_strcmp:
- @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \
+ @grep -nE '! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \
$$($(VC_LIST_EXCEPT)) \
| grep -vE ':# *define STRN?EQ\(' && \
- { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
+ { echo '$(ME): replace strcmp calls above with STREQ/STRNEQ' \
1>&2; exit 1; } || :
# Pass EXIT_*, not number, to usage, exit, and error (when exiting)