Changeset a35b458 in mainline for uspace/srv/ns/ns.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (6 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/ns/ns.c

    r3061bc1 ra35b458  
    6969                return;
    7070        }
    71        
     71
    7272        async_answer_0(iid, EOK);
    7373
    7474        while (true) {
    7575                process_pending_conn();
    76                
     76
    7777                callid = async_get_call(&call);
    7878                if (!IPC_GET_IMETHOD(call))
    7979                        break;
    80                
     80
    8181                task_id_t id;
    8282                errno_t retval;
    83                
     83
    8484                service_t service;
    8585                sysarg_t phone;
    86                
     86
    8787                switch (IPC_GET_IMETHOD(call)) {
    8888                case NS_REGISTER:
    8989                        service = IPC_GET_ARG1(call);
    9090                        phone = IPC_GET_ARG5(call);
    91                        
     91
    9292                        /*
    9393                         * Server requests service registration.
     
    9999                                retval = register_service(service, phone, &call);
    100100                        }
    101                        
     101
    102102                        break;
    103103                case NS_PING:
     
    120120                        break;
    121121                }
    122                
     122
    123123                async_answer_0(callid, retval);
    124124        }
     
    130130{
    131131        printf("%s: HelenOS IPC Naming Service\n", NAME);
    132        
     132
    133133        errno_t rc = service_init();
    134134        if (rc != EOK)
    135135                return rc;
    136        
     136
    137137        rc = clonable_init();
    138138        if (rc != EOK)
    139139                return rc;
    140        
     140
    141141        rc = task_init();
    142142        if (rc != EOK)
    143143                return rc;
    144        
     144
    145145        async_set_fallback_port_handler(ns_connection, NULL);
    146        
     146
    147147        printf("%s: Accepting connections\n", NAME);
    148148        async_manager();
    149        
     149
    150150        /* Not reached */
    151151        return 0;
Note: See TracChangeset for help on using the changeset viewer.