tests: detect and check more uses of strcmp
authorJim Meyering <meyering@redhat.com>
Wed, 30 Apr 2008 09:57:06 +0000 (11:57 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 6 May 2008 06:21:28 +0000 (08:21 +0200)
* maint.mk (sc_prohibit_strcmp): Relax regexp to recognize other
formatting styles.

maint.mk

index e8671bd..53a124d 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -131,7 +131,7 @@ sc_prohibit_atoi_atof:
 
 # Use STREQ rather than comparing strcmp == 0, or != 0.
 sc_prohibit_strcmp:
-       @grep -nE '! *str''cmp \(|\<str''cmp \([^)]+\) *=='             \
+       @grep -nE '! *str''cmp *\(|\<str''cmp *\([^)]+\) *=='           \
            $$($(VC_LIST_EXCEPT)) &&                                    \
          { echo '$(ME): use STREQ in place of the above uses of str''cmp' \
                1>&2; exit 1; } || :