summaryrefslogtreecommitdiffstats
path: root/contrib/file/softmagic.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2003-02-15 18:53:17 +0000
committerobrien <obrien@FreeBSD.org>2003-02-15 18:53:17 +0000
commit822cce384d16c9a63f80e0c0765717d4a329368d (patch)
tree8ac609acaed8017450269720d947a6a7bd69e3ea /contrib/file/softmagic.c
parent2ef757c3c642f5ce8353e106c1fbbd3cea2b14c1 (diff)
downloadFreeBSD-src-822cce384d16c9a63f80e0c0765717d4a329368d.zip
FreeBSD-src-822cce384d16c9a63f80e0c0765717d4a329368d.tar.gz
Virgin import of Christos Zoulas's FILE 3.40.
Diffstat (limited to 'contrib/file/softmagic.c')
-rw-r--r--contrib/file/softmagic.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/file/softmagic.c b/contrib/file/softmagic.c
index 891910c..8ef5fbf 100644
--- a/contrib/file/softmagic.c
+++ b/contrib/file/softmagic.c
@@ -34,7 +34,7 @@
#ifndef lint
-FILE_RCSID("@(#)$Id: softmagic.c,v 1.51 2002/07/03 18:26:38 christos Exp $")
+FILE_RCSID("@(#)$Id: softmagic.c,v 1.52 2003/02/08 18:33:53 christos Exp $")
#endif /* lint */
static int match(struct magic *, uint32_t, unsigned char *, int);
@@ -564,9 +564,10 @@ mget(union VALUETYPE *p, unsigned char *s, struct magic *m, int nbytes)
* offset is interpreted as last line to search,
* (starting at 1), not as bytes-from start-of-file
*/
- char *last = NULL;
- p->buf = s;
- for (; offset && (s = strchr(s, '\n')) != NULL; offset--, s++)
+ unsigned char *last = NULL;
+ p->buf = (char *)s;
+ for (; offset && (s = (unsigned char *)strchr(s, '\n')) != NULL;
+ offset--, s++)
last = s;
if (last != NULL)
*last = '\0';
OpenPOWER on IntegriCloud