Changeset 32260a0 in mainline for uspace/app/usbinfo/main.c


Ignore:
Timestamp:
2012-07-20T16:38:15Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6de2d766
Parents:
8d355aa8
Message:

usbinfo: Remove redundant loop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/main.c

    r8d355aa8 r32260a0  
    148148        }
    149149
     150        bool something_active = false;
    150151        /*
    151152         * Process command-line options. They determine what shall be
     
    173174                                        if (actions[idx].opt == opt) {
    174175                                                actions[idx].active = true;
     176                                                something_active = true;
    175177                                                break;
    176178                                        }
     
    183185
    184186        /* Set the default action. */
    185         int idx = 0;
    186         bool something_active = false;
    187         while (actions[idx].opt != 0) {
    188                 if (actions[idx].active) {
    189                         something_active = true;
    190                         break;
    191                 }
    192                 idx++;
    193         }
    194187        if (!something_active) {
    195188                actions[0].active = true;
Note: See TracChangeset for help on using the changeset viewer.