Changeset a35b458 in mainline for uspace/srv/net/inetsrv/sroute.c


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/net/inetsrv/sroute.c

    r3061bc1 ra35b458  
    9696{
    9797        ip_ver_t addr_ver = inet_addr_get(addr, NULL, NULL);
    98        
     98
    9999        inet_sroute_t *best = NULL;
    100100        uint8_t best_bits = 0;
    101        
    102         fibril_mutex_lock(&sroute_list_lock);
    103        
     101
     102        fibril_mutex_lock(&sroute_list_lock);
     103
    104104        list_foreach(sroute_list, sroute_list, inet_sroute_t, sroute) {
    105105                uint8_t dest_bits;
    106106                ip_ver_t dest_ver = inet_naddr_get(&sroute->dest, NULL, NULL,
    107107                    &dest_bits);
    108                
     108
    109109                /* Skip comparison with different address family */
    110110                if (addr_ver != dest_ver)
    111111                        continue;
    112                
     112
    113113                /* Look for the most specific route */
    114114                if ((best != NULL) && (best_bits >= dest_bits))
    115115                        continue;
    116                
     116
    117117                if (inet_naddr_compare_mask(&sroute->dest, addr)) {
    118118                        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find: found candidate %p",
    119119                            sroute);
    120                        
     120
    121121                        best = sroute;
    122122                        best_bits = dest_bits;
    123123                }
    124124        }
    125        
     125
    126126        if (best == NULL)
    127127                log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find: Not found");
    128        
    129         fibril_mutex_unlock(&sroute_list_lock);
    130        
     128
     129        fibril_mutex_unlock(&sroute_list_lock);
     130
    131131        return best;
    132132}
Note: See TracChangeset for help on using the changeset viewer.