From 9fa1fde7810f17950543fc5b6c40d953d812a1cc Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 24 Feb 2012 09:45:54 +0100 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ top/maint.mk | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43bfdf5f2..681d77344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-02-24 Jim Meyering + + 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. + 2012-02-24 Bruno Haible streq: Rename macro. diff --git a/top/maint.mk b/top/maint.mk index 1dd649351..ee721de30 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 *\(|\&2; exit 1; } || : # Pass EXIT_*, not number, to usage, exit, and error (when exiting) -- 2.11.0