Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/proto/mousedev.c

    r3061bc1 ra35b458  
    5959        if (mousedev == NULL)
    6060                return NULL;
    61        
     61
    6262        mousedev->mouse_dev = mdev;
    63        
     63
    6464        return mousedev;
    6565}
     
    7575        /* Mousedev device structure */
    7676        mousedev_t *mousedev = (mousedev_t *) arg;
    77        
     77
    7878        while (true) {
    7979                ipc_call_t call;
    8080                ipc_callid_t callid = async_get_call(&call);
    81                
     81
    8282                if (!IPC_GET_IMETHOD(call)) {
    8383                        mousedev_destroy(mousedev);
    8484                        return;
    8585                }
    86                
     86
    8787                errno_t retval;
    88                
     88
    8989                switch (IPC_GET_IMETHOD(call)) {
    9090                case MOUSEEV_MOVE_EVENT:
     
    109109                        break;
    110110                }
    111                
     111
    112112                async_answer_0(callid, retval);
    113113        }
     
    122122                return ENOENT;
    123123        }
    124        
     124
    125125        mousedev_t *mousedev = mousedev_new(mdev);
    126126        if (mousedev == NULL) {
     
    130130                return ENOMEM;
    131131        }
    132        
     132
    133133        async_exch_t *exch = async_exchange_begin(sess);
    134134        if (exch == NULL) {
     
    139139                return ENOENT;
    140140        }
    141        
     141
    142142        port_id_t port;
    143143        errno_t rc = async_create_callback_port(exch, INTERFACE_MOUSE_CB, 0, 0,
    144144            mousedev_callback_conn, mousedev, &port);
    145        
     145
    146146        async_exchange_end(exch);
    147147        async_hangup(sess);
    148        
     148
    149149        if (rc != EOK) {
    150150                printf("%s: Failed creating callback connection from '%s'.\n",
     
    153153                return rc;
    154154        }
    155        
     155
    156156        return EOK;
    157157}
Note: See TracChangeset for help on using the changeset viewer.