summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2016-08-31 21:12:57 -0700
committerJim Meyering <meyering@fb.com>2016-08-31 21:12:57 -0700
commit88df28da657a57e037a0381bcc1e5fa0c0ba72b7 (patch)
tree3b9ab546b5df4d8ea24c71e43ceb3d7949883d43
parent75212cb0127af01e8c389ebf87a33689e8ce772e (diff)
downloadgrep-88df28da657a57e037a0381bcc1e5fa0c0ba72b7.tar.gz
maint: avoid new 'make syntax-check' failure
* src/dfa.c (using_simple_locale): Prefer STREQ(a,b) over strcmp(a,b) == 0.
-rw-r--r--src/dfa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dfa.c b/src/dfa.c
index bf8c5463..cc96740e 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -820,7 +820,7 @@ using_simple_locale (bool multibyte)
/* Treat C and POSIX locales as being compatible. Also, treat
errors as compatible, as these are invariably from stubs. */
char const *loc = setlocale (LC_ALL, NULL);
- return !loc || strcmp (loc, "C") == 0 || strcmp (loc, "POSIX") == 0;
+ return !loc || STREQ (loc, "C") || STREQ (loc, "POSIX");
}
}