Changeset 338d54a7 in mainline for uspace/drv/hid/xtkbd/xtkbd.c


Ignore:
Timestamp:
2018-03-10T22:55:07Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
850fd32
Parents:
5ef16903
Message:

Gratuitous nested block makes ccheck sad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/hid/xtkbd/xtkbd.c

    r5ef16903 r338d54a7  
    338338        const sysarg_t method = IPC_GET_IMETHOD(*icall);
    339339        xt_kbd_t *kbd = ddf_dev_data_get(ddf_fun_get_dev(fun));
     340        unsigned mods;
     341        async_sess_t *sess;
    340342
    341343        switch (method) {
    342         case KBDEV_SET_IND: {
     344        case KBDEV_SET_IND:
    343345                /*
    344346                 * XT keyboards do not support setting mods,
    345347                 * assume AT keyboard with Scan Code Set 1.
    346348                 */
    347                 const unsigned mods = IPC_GET_ARG1(*icall);
     349                mods = IPC_GET_ARG1(*icall);
    348350                const uint8_t status = 0 |
    349351                    ((mods & KM_CAPS_LOCK) ? LI_CAPS : 0) |
     
    362364                async_answer_0(icallid, rc);
    363365                break;
    364         }
    365366        /*
    366367         * This might be ugly but async_callback_receive_start makes no
    367368         * difference for incorrect call and malloc failure.
    368369         */
    369         case IPC_M_CONNECT_TO_ME: {
    370                 async_sess_t *sess =
    371                     async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
     370        case IPC_M_CONNECT_TO_ME:
     371                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    372372
    373373                /* Probably ENOMEM error, try again. */
     
    389389
    390390                break;
    391         }
    392391        default:
    393392                ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method);
Note: See TracChangeset for help on using the changeset viewer.