Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/quiz fix signedness issue



details:   https://anonhg.NetBSD.org/src/rev/f72550a3284b
branches:  trunk
changeset: 327994:f72550a3284b
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sun Mar 23 00:07:15 2014 +0000

description:
fix signedness issue

diffstat:

 games/quiz/quiz.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ebbcf5028531 -r f72550a3284b games/quiz/quiz.c
--- a/games/quiz/quiz.c Sun Mar 23 00:03:04 2014 +0000
+++ b/games/quiz/quiz.c Sun Mar 23 00:07:15 2014 +0000
@@ -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 @@
 #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 @@
        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 @@
                        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;



Home | Main Index | Thread Index | Old Index