]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
stringeq: diagnose for streq instead of STREQ
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Sep 2025 06:09:25 +0000 (23:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Sep 2025 15:20:25 +0000 (08:20 -0700)
* top/maint.mk (sc_prohibit_strcmp): In diagnostic, suggest streq
instead of STREQ/STRNEQ.

ChangeLog
top/maint.mk

index d0ed07e64f8b85d56932e2bee6645b91d6aa2830..b3539fa10f90fed135f8019e2542820dc915cf6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-09-17  Paul Eggert  <eggert@cs.ucla.edu>
 
+       stringeq: diagnose for streq instead of STREQ
+       * top/maint.mk (sc_prohibit_strcmp): In diagnostic, suggest streq
+       instead of STREQ/STRNEQ.
+
        stringeq: prefer streq to strcmp in other modules
        * lib/acl-internal.c, lib/argmatch.c, lib/argp-help.c:
        * lib/argp-parse.c, lib/bcp47.c, lib/c32_get_mapping.c:
index 9a943eacabdaa3da4c55d4a144c81afb90c67662..175e6874798ff91cf71d1bf8df39114ddb6784a9 100644 (file)
@@ -386,12 +386,12 @@ sc_prohibit_atoi_atof:
        halt='do not use *scan''f, ato''f, ato''i, ato''l, ato''ll or ato''q'   \
          $(_sc_search_regexp)
 
-# Use STREQ rather than comparing strcmp == 0, or != 0.
+# Use streq rather than comparing strcmp == 0, or != 0.
 sp_ = strcmp *\(.+\)
 sc_prohibit_strcmp:
        @prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)'         \
        exclude='# *define STRN?EQ\('                                   \
-       halt='replace strcmp calls above with STREQ/STRNEQ'             \
+       halt='replace strcmp calls above with streq'                    \
          $(_sc_search_regexp)
 
 # Really.  You don't want to use this function.