NetBSD-Bugs archive

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

port-evbmips/50735: src/sys/arch/evbmips/gdium/machdep.c:224: leap before looking ?



>Number:         50735
>Category:       port-evbmips
>Synopsis:       src/sys/arch/evbmips/gdium/machdep.c:224: leap before looking ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-evbmips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 01 16:35:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160131
>Organization:
>Environment:
>Description:

[src/sys/arch/evbmips/gdium/machdep.c:224]: (style) Array index 'i' is used before limits check.

   while ((eptrs[i] != 0) && (i < 128)) {

Something like 

   while ((i < 128) && (eptrs[i] != 0)) {

would be more usual.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index