summaryrefslogtreecommitdiff
path: root/usr.bin/grep
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-26 13:21:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-26 13:21:19 +0000
commit42f68a7a6d855d973bf3c59d10e6519e0240d4f2 (patch)
tree64c16d6722fec7697ed1e37a4adecbda0314e831 /usr.bin/grep
parent9c87bfa9d5ea46fd4fe5c8edb947aec28e748573 (diff)
unsigned char casts for ctype
ok krw
Diffstat (limited to 'usr.bin/grep')
-rw-r--r--usr.bin/grep/grep.h4
-rw-r--r--usr.bin/grep/util.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h
index 435dd3b6046..63d3dacb4a6 100644
--- a/usr.bin/grep/grep.h
+++ b/usr.bin/grep/grep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: grep.h,v 1.18 2012/12/29 01:32:44 millert Exp $ */
+/* $OpenBSD: grep.h,v 1.19 2013/11/26 13:21:16 deraadt Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -86,7 +86,7 @@ void *grep_calloc(size_t nmemb, size_t size);
void *grep_realloc(void *ptr, size_t size);
void printline(str_t *line, int sep, regmatch_t *pmatch);
int fastcomp(fastgrep_t *, const char *);
-void fgrepcomp(fastgrep_t *, const char *);
+void fgrepcomp(fastgrep_t *, const unsigned char *);
/* queue.c */
void initqueue(void);
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index c7aee73bfa4..33dc25e392d 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.46 2013/05/04 00:26:20 tedu Exp $ */
+/* $OpenBSD: util.c,v 1.47 2013/11/26 13:21:16 deraadt Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -165,7 +165,7 @@ procfile(char *fn)
* Process an individual line in a file. Return non-zero if it matches.
*/
-#define isword(x) (isalnum(x) || (x) == '_')
+#define isword(x) (isalnum((unsigned char)x) || (x) == '_')
static int
procline(str_t *l, int nottext)
@@ -245,7 +245,7 @@ print:
#ifndef SMALL
void
-fgrepcomp(fastgrep_t *fg, const char *pattern)
+fgrepcomp(fastgrep_t *fg, const unsigned char *pattern)
{
int i;