Changeset a35b458 in mainline for uspace/app/trace/ipcp.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 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/app/trace/ipcp.c

    r3061bc1 ra35b458  
    253253        proto_t *proto;
    254254        int cphone;
    255        
     255
    256256        sysarg_t *resp;
    257257        oper_t *oper;
    258258        int i;
    259        
     259
    260260        phone = pcall->phone_hash;
    261261        method = IPC_GET_IMETHOD(pcall->question);
    262262        retval = IPC_GET_RETVAL(*answer);
    263        
     263
    264264        resp = answer->args;
    265        
     265
    266266        if ((display_mask & DM_IPC) != 0) {
    267267                printf("Response to %d: retval=%s, args = (%" PRIun ", "
     
    271271                    IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
    272272        }
    273        
     273
    274274        if ((display_mask & DM_USER) != 0) {
    275275                oper = pcall->oper;
    276                
     276
    277277                if ((oper != NULL) &&
    278278                    ((oper->rv_type != V_VOID) || (oper->respc > 0))) {
    279279                        printf("->");
    280                        
     280
    281281                        if (oper->rv_type != V_VOID) {
    282282                                putchar(' ');
    283283                                val_print((sysarg_t) retval, oper->rv_type);
    284284                        }
    285                        
     285
    286286                        if (oper->respc > 0) {
    287287                                putchar(' ');
     
    294294                                putchar(')');
    295295                        }
    296                        
     296
    297297                        putchar('\n');
    298298                }
    299299        }
    300        
     300
    301301        if ((phone == PHONE_NS) && (method == IPC_M_CONNECT_ME_TO) &&
    302302            (retval == 0)) {
     
    306306                if (proto == NULL)
    307307                        proto = proto_unknown;
    308                
     308
    309309                cphone = IPC_GET_ARG5(*answer);
    310310                if ((display_mask & DM_SYSTEM) != 0) {
     
    312312                    proto->name);
    313313                }
    314                
     314
    315315                ipcp_connection_set(cphone, 0, proto);
    316316        }
     
    321321        ht_link_t *item;
    322322        pending_call_t *pcall;
    323        
     323
    324324        if ((call->flags & IPC_CALL_ANSWERED) == 0) {
    325325                /* Not a response */
     
    329329                return;
    330330        }
    331        
     331
    332332        item = hash_table_find(&pending_calls, &hash);
    333333        if (item == NULL)
    334334                return; /* No matching question found */
    335        
     335
    336336        /*
    337337         * Response matched to question.
    338338         */
    339        
     339
    340340        pcall = hash_table_get_inst(item, pending_call_t, link);
    341341        hash_table_remove(&pending_calls, &hash);
    342        
     342
    343343        parse_answer(hash, pcall, call);
    344344        free(pcall);
Note: See TracChangeset for help on using the changeset viewer.