NetBSD-Bugs archive

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

bin/50886: src/usr.sbin/sysinst/partman.c:472: some confused coding ?



>Number:         50886
>Category:       bin
>Synopsis:       src/usr.sbin/sysinst/partman.c:472: some confused coding ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 02 19:45:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160302
>Organization:
>Environment:
>Description:
src/usr.sbin/sysinst/partman.c:472]: (style) Statements following return, break, continue, goto or throw will never be executed.

Source code is

        case PMR_MENU_NUMROW:
            process_menu(MENU_ok, deconst(MSG_raid_nomultidim));
            return 0;
            msg_to_show = MSG_raid_numrow_ask;
            out_var = &(dev_ptr->numRow);
            break;

This looks like a cut'n'paste error to me.
Suggest code rework.

Also, I found this:

[src/usr.sbin/sysinst/partman.c:1806]: (style) Variable 'hackerr' is assigned a value that is never used.

Source code is

    for (i = 0; i < num; i ++)
        if (! wedges[i].allocated && wedges[i].todel) {
            hackerr = run_program(RUN_SILENT | RUN_ERROR_OK,
                "dkctl %s delwedge dk%d", wedges[num].pm->diskdev, i);
            wedges[i].todel = 0;
        }

This might also benefit from some rework.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index