summaryrefslogtreecommitdiff
path: root/src/pcresearch.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-10-03 12:08:31 +0200
committerJim Meyering <meyering@redhat.com>2012-10-03 12:21:49 +0200
commit3b14aaa4ddefb86e1bff782fc4575eec6186ca49 (patch)
tree09fa65b05964d1f47f1ce1412b64b66ad95f23e8 /src/pcresearch.c
parent8f365f028427e4f8f6f52e548a3a0cbf3c9e94db (diff)
downloadgrep-3b14aaa4ddefb86e1bff782fc4575eec6186ca49.tar.gz
maint: correct syntax-check failures; adjust NEWS
* tests/pcre-utf8: Reverse order of compare arguments. Remove all copyright year numbers except 2012. Use skip_ "diagnostic...", rather than a bare "exit 77". * NEWS: Start with a concise description of the bug. * src/pcresearch.c (STREQ): Define, so that we can... (Pcompile): use STREQ, not strcmp.
Diffstat (limited to 'src/pcresearch.c')
-rw-r--r--src/pcresearch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 3539b580..a15f598d 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -29,6 +29,8 @@
# include <langinfo.h>
#endif
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
#if HAVE_LIBPCRE
/* Compiled internal form of a Perl regular expression. */
static pcre *cre;
@@ -55,7 +57,7 @@ Pcompile (char const *pattern, size_t size)
char const *pnul;
#if defined HAVE_LANGINFO_CODESET
- if (!strcmp(nl_langinfo(CODESET), "UTF-8"))
+ if (STREQ (nl_langinfo (CODESET), "UTF-8"))
flags |= PCRE_UTF8;
#endif