From: Jim Meyering Date: Fri, 24 Feb 2012 08:45:54 +0000 (+0100) Subject: maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too X-Git-Tag: v0.1~1140 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=9fa1fde7810f17950543fc5b6c40d953d812a1cc 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. --- 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)