Module Name: src
Committed By: dholland
Date: Sun Mar 23 00:07:15 UTC 2014
Modified Files:
src/games/quiz: quiz.c
Log Message:
fix signedness issue
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/games/quiz/quiz.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/quiz/quiz.c
diff -u src/games/quiz/quiz.c:1.26 src/games/quiz/quiz.c:1.27
--- src/games/quiz/quiz.c:1.26 Thu Aug 27 00:31:12 2009
+++ src/games/quiz/quiz.c Sun Mar 23 00:07:15 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: quiz.c,v 1.26 2009/08/27 00:31:12 dholland Exp $ */
+/* $NetBSD: quiz.c,v 1.27 2014/03/23 00:07:15 dholland Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19
#if 0
static char sccsid[] = "@(#)quiz.c 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: quiz.c,v 1.26 2009/08/27 00:31:12 dholland Exp $");
+__RCSID("$NetBSD: quiz.c,v 1.27 2014/03/23 00:07:15 dholland Exp $");
#endif
#endif /* not lint */
@@ -226,7 +226,7 @@ quiz(void)
int i;
size_t len;
unsigned guesses, rights, wrongs;
- int next;
+ unsigned next, j;
char *answer, *t, question[LINE_SZ];
const char *s;
@@ -237,7 +237,7 @@ quiz(void)
break;
next = random() % qsize;
qp = qlist.q_next;
- for (i = 0; i < next; i++)
+ for (j = 0; j < next; j++)
qp = qp->q_next;
while (qp && qp->q_answered)
qp = qp->q_next;