Lowering the scope And cleaning up some warnings from static analysis
[open-adventure.git] / actions.c
index 51972507052be7e1276022a32633bd5bdc412839..cc2f66cedc1348eb781a5ee8c1ffa18425a03835 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -774,11 +774,10 @@ static int quit(FILE *input)
 static int read(FILE *input, token_t verb, token_t obj)
 /*  Read.  Print stuff based on objtxt.  Oyster (?) is special case. */
 {
-    int i;
     int spk = ACTSPK[verb];
     if (obj == INTRANSITIVE) {
        obj = 0;
-       for (i=1; i<=NOBJECTS; i++) {
+       for (int i=1; i<=NOBJECTS; i++) {
            if (HERE(i) && OBJTXT[i] != 0 && game.prop[i] >= 0)
                obj = obj * NOBJECTS + i;
        }