Changeset 102f641 in mainline for uspace/srv/sysman/connection_ctl.c


Ignore:
Timestamp:
2019-09-02T19:01:50Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
25697163
Parents:
241f1985
Message:

Correcting syntax according to ccheck

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/connection_ctl.c

    r241f1985 r102f641  
    4141#include "sysman.h"
    4242
    43 
    4443// TODO possibly provide as type-safe function + macro in sysman.h for generic boxing
    4544static ipc_call_t *box_callid(ipc_call_t *icall)
     
    215214        size_t act_size;
    216215        int rc;
    217        
     216
    218217        if (!async_data_read_receive(&call, &size)) {
    219218                async_answer_0(&call, EREFUSED);
     
    221220                return;
    222221        }
    223        
    224        
     222
    225223        unit_handle_t *handles = malloc(size);
    226224        if (handles == NULL && size > 0) {
     
    229227                return;
    230228        }
    231        
    232        
     229
    233230        rc = fill_handles_buffer(handles, size, &act_size);
    234231        if (rc != EOK) {
     
    237234                return;
    238235        }
    239        
     236
    240237        size_t real_size = min(act_size, size);
    241238        sysarg_t retval = async_data_read_finalize(&call, handles, real_size);
    242239        free(handles);
    243        
     240
    244241        async_answer_1(icall, retval, act_size);
    245242}
     
    249246        ipc_call_t call;
    250247        size_t size;
    251        
     248
    252249        if (!async_data_read_receive(&call, &size)) {
    253250                async_answer_0(&call, EREFUSED);
     
    255252                return;
    256253        }
    257        
     254
    258255        unit_t *u = repo_find_unit_by_handle(ipc_get_arg1(icall));
    259256        if (u == NULL) {
     
    262259                return;
    263260        }
    264        
     261
    265262        size_t real_size = min(str_size(u->name) + 1, size);
    266263        sysarg_t retval = async_data_read_finalize(&call, u->name, real_size);
    267        
     264
    268265        async_answer_0(icall, retval);
    269266}
     
    303300        while (true) {
    304301                ipc_call_t call;
    305                
     302
    306303                if (!async_get_call(&call) || !ipc_get_imethod(&call)) {
    307304                        /* Client disconnected */
     
    339336        }
    340337}
    341 
Note: See TracChangeset for help on using the changeset viewer.