Coverity CID 1294: Avoid negative variable used as index.
This commit is contained in:
parent
2a67d42737
commit
e0b976a0ae
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: table.c,v 1.8 2005/07/01 01:12:39 jmc Exp $ */
|
||||
/* $NetBSD: table.c,v 1.9 2006/03/18 23:23:33 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: table.c,v 1.8 2005/07/01 01:12:39 jmc Exp $");
|
||||
__RCSID("$NetBSD: table.c,v 1.9 2006/03/18 23:23:33 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -298,6 +298,7 @@ rsetbrd(void)
|
|||
for (i = 0; i < 4; i++)
|
||||
p[i] = g[i] = -1;
|
||||
for (j = 0; j < ncin; j++)
|
||||
n = dotable(cin[j], n);
|
||||
if ((n = dotable(cin[j], n)) < 0)
|
||||
return n;
|
||||
return (n);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue