Module Name: src
Committed By: lukem
Date: Wed Apr 15 00:40:01 UTC 2009
Modified Files:
src/usr.sbin/catman: catman.c
Log Message:
Fix -Wsign-compare issues
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/catman/catman.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/catman/catman.c
diff -u src/usr.sbin/catman/catman.c:1.28 src/usr.sbin/catman/catman.c:1.29
--- src/usr.sbin/catman/catman.c:1.28 Fri May 2 19:59:19 2008
+++ src/usr.sbin/catman/catman.c Wed Apr 15 00:40:01 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: catman.c,v 1.28 2008/05/02 19:59:19 xtraeme Exp $ */
+/* $NetBSD: catman.c,v 1.29 2009/04/15 00:40:01 lukem Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -164,7 +164,7 @@
err(1, "malloc");
for (p = sections; *p;) {
i = snprintf(buf, sizeof(buf), "man%c", *p++);
- for (; *p && !isdigit((unsigned char)*p) && i < sizeof(buf) - 1; i++)
+ for (; *p && !isdigit((unsigned char)*p) && i < (int)sizeof(buf) - 1; i++)
buf[i] = *p++;
buf[i] = '\0';
if (addentry(sectnewp, buf, 0) < 0)
@@ -525,7 +525,7 @@
;
if (*c == '\0')
return(0);
- if (c - s + 1 > firstlen)
+ if ((size_t)(c - s + 1) > firstlen)
return(0);
strncpy(first, s, c-s);
first[c-s] = '\0';