Mercurial > gnulib
diff top/maint.mk @ 16386:bb8c8cc1050d
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.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Fri, 24 Feb 2012 09:45:54 +0100 |
parents | 817d5933e56e |
children | b9f8d388ab96 |
line wrap: on
line diff
--- a/top/maint.mk Fri Feb 24 12:33:07 2012 +0100 +++ b/top/maint.mk Fri Feb 24 09:45:54 2012 +0100 @@ -303,11 +303,12 @@ $(_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)