NetBSD-Bugs archive

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

misc/50784: src/sys/compat/ndis/subr_ntoskrnl.c:439: possible missing { and } ?



>Number:         50784
>Category:       misc
>Synopsis:       src/sys/compat/ndis/subr_ntoskrnl.c:439: possible missing { and } ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 08 16:25:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160208
>Organization:
>Environment:
>Description:
[src/sys/compat/ndis/subr_ntoskrnl.c:439]: (style) Statements following return, break, continue, goto or throw will never be executed.

Source code is

    while (e != &drv->dro_driverext->dre_usrext) {
        ce = (custom_extension *)e;
        if (ce->ce_clid == clid)
            printf("found\n");
            return((void *)(ce + 1));
        e = e->nle_flink;
    }

Maybe better code

    while (e != &drv->dro_driverext->dre_usrext) {
        ce = (custom_extension *)e;
        if (ce->ce_clid == clid) {
            printf("found\n");
            return((void *)(ce + 1));
        }
        e = e->nle_flink;
    }

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index