From: Paul Eggert Date: Wed, 17 Sep 2025 06:09:25 +0000 (-0700) Subject: stringeq: diagnose for streq instead of STREQ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b95da5f7a70f50edce975d73103839419329dbfc;p=thirdparty%2Fgnulib.git stringeq: diagnose for streq instead of STREQ * top/maint.mk (sc_prohibit_strcmp): In diagnostic, suggest streq instead of STREQ/STRNEQ. --- diff --git a/ChangeLog b/ChangeLog index d0ed07e64f..b3539fa10f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-09-17 Paul Eggert + 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: diff --git a/top/maint.mk b/top/maint.mk index 9a943eacab..175e687479 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -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.