Module Name: src
Committed By: lukem
Date: Wed Apr 15 00:43:29 UTC 2009
Modified Files:
src/usr.sbin/chrtbl: chrtbl.c
Log Message:
Fix -Wsign-compare issues
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/chrtbl/chrtbl.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/chrtbl/chrtbl.c
diff -u src/usr.sbin/chrtbl/chrtbl.c:1.10 src/usr.sbin/chrtbl/chrtbl.c:1.11
--- src/usr.sbin/chrtbl/chrtbl.c:1.10 Fri May 2 19:59:19 2008
+++ src/usr.sbin/chrtbl/chrtbl.c Wed Apr 15 00:43:29 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: chrtbl.c,v 1.10 2008/05/02 19:59:19 xtraeme Exp $ */
+/* $NetBSD: chrtbl.c,v 1.11 2009/04/15 00:43:29 lukem Exp $ */
/*
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -364,7 +364,7 @@
const char *fn;
const struct chartbl *ct;
{
- int i;
+ size_t i;
FILE *fp;
if ((fp = fopen(fn, "w")) == NULL) {
@@ -442,6 +442,7 @@
const struct toklist *t;
struct chartbl ct;
int c;
+ size_t i;
char *ifname, *ofname = NULL;
int error = 0;
@@ -505,11 +506,11 @@
}
(void) fclose(fp);
- for (c = 1; c <= ct.maxchar; c++) {
- if (ct.uptab[c] == 0)
- ct.uptab[c] = c - 1;
- if (ct.lotab[c] == 0)
- ct.lotab[c] = c - 1;
+ for (i = 1; i <= ct.maxchar; i++) {
+ if (ct.uptab[i] == 0)
+ ct.uptab[i] = i - 1;
+ if (ct.lotab[i] == 0)
+ ct.lotab[i] = i - 1;
}
if (ofname != NULL)