summaryrefslogtreecommitdiffstats
path: root/quiz
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2014-03-23 00:07:15 +0000
committerdholland <dholland@NetBSD.org>2014-03-23 00:07:15 +0000
commit7583ff386b9283ab7aadace2a029a83f70ff186b (patch)
treecf2fa12cede1e48f3899c4af05237bcac887075d /quiz
parentea4ab94b8b2541726e287b272223b3db9875a4fd (diff)
downloadbsdgames-darwin-7583ff386b9283ab7aadace2a029a83f70ff186b.tar.gz
bsdgames-darwin-7583ff386b9283ab7aadace2a029a83f70ff186b.tar.zst
bsdgames-darwin-7583ff386b9283ab7aadace2a029a83f70ff186b.zip
fix signedness issue
Diffstat (limited to 'quiz')
-rw-r--r--quiz/quiz.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quiz/quiz.c b/quiz/quiz.c
index eb11f916..b2e76ba6 100644
--- a/quiz/quiz.c
+++ b/quiz/quiz.c
@@ -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, 1993\
#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;