Module Name: src Committed By: lukem Date: Sun Apr 5 12:06:33 UTC 2009
Modified Files: src/sbin/rndctl: rndctl.c Log Message: fix sign-compare issues To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sbin/rndctl/rndctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/rndctl/rndctl.c diff -u src/sbin/rndctl/rndctl.c:1.18 src/sbin/rndctl/rndctl.c:1.19 --- src/sbin/rndctl/rndctl.c:1.18 Thu Nov 6 16:01:54 2008 +++ src/sbin/rndctl/rndctl.c Sun Apr 5 12:06:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rndctl.c,v 1.18 2008/11/06 16:01:54 apb Exp $ */ +/* $NetBSD: rndctl.c,v 1.19 2009/04/05 12:06:33 lukem Exp $ */ /*- * Copyright (c) 1997 Michael Graff. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rndctl.c,v 1.18 2008/11/06 16:01:54 apb Exp $"); +__RCSID("$NetBSD: rndctl.c,v 1.19 2009/04/05 12:06:33 lukem Exp $"); #endif @@ -163,6 +163,7 @@ rndstat_name_t rstat_name; int fd; int res; + uint32_t i; u_int32_t start; fd = open("/dev/urandom", O_RDONLY, 0644); @@ -200,14 +201,14 @@ if (rstat.count == 0) break; - for (res = 0; res < rstat.count; res++) { + for (i = 0; i < rstat.count; i++) { if (all != 0 || - type == rstat.source[res].type) + type == rstat.source[i].type) printf("%-16s %10u %-4s %s\n", - rstat.source[res].name, - rstat.source[res].total, - find_name(rstat.source[res].type), - strflags(rstat.source[res].flags)); + rstat.source[i].name, + rstat.source[i].total, + find_name(rstat.source[i].type), + strflags(rstat.source[i].flags)); } start += rstat.count; }