Changeset a35b458 in mainline for uspace/srv/fs/udf/udf_idx.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/fs/udf/udf_idx.c

    r3061bc1 ra35b458  
    9595        if (!hash_table_create(&udf_idx, 0, 0, &udf_idx_ops))
    9696                return ENOMEM;
    97        
     97
    9898        return EOK;
    9999}
     
    127127                .index = index
    128128        };
    129        
     129
    130130        ht_link_t *already_open = hash_table_find(&udf_idx, &key);
    131131        if (already_open) {
     
    133133                    udf_node_t, link);
    134134                node->ref_cnt++;
    135                
     135
    136136                *udfn = node;
    137                
     137
    138138                fibril_mutex_unlock(&udf_idx_lock);
    139139                return EOK;
    140140        }
    141        
     141
    142142        fibril_mutex_unlock(&udf_idx_lock);
    143143        return ENOENT;
     
    156156{
    157157        fibril_mutex_lock(&udf_idx_lock);
    158        
     158
    159159        udf_node_t *udf_node = malloc(sizeof(udf_node_t));
    160160        if (udf_node == NULL) {
     
    162162                return ENOMEM;
    163163        }
    164        
     164
    165165        fs_node_t *fs_node = malloc(sizeof(fs_node_t));
    166166        if (fs_node == NULL) {
     
    169169                return ENOMEM;
    170170        }
    171        
     171
    172172        fs_node_initialize(fs_node);
    173        
     173
    174174        udf_node->index = index;
    175175        udf_node->instance = instance;
     
    179179        udf_node->data = NULL;
    180180        udf_node->allocators = NULL;
    181        
     181
    182182        fibril_mutex_initialize(&udf_node->lock);
    183183        fs_node->data = udf_node;
    184        
     184
    185185        hash_table_insert(&udf_idx, &udf_node->link);
    186186        instance->open_nodes_count++;
    187        
     187
    188188        *udfn = udf_node;
    189        
     189
    190190        fibril_mutex_unlock(&udf_idx_lock);
    191191        return EOK;
     
    202202{
    203203        assert(node->ref_cnt == 0);
    204        
     204
    205205        fibril_mutex_lock(&udf_idx_lock);
    206        
     206
    207207        hash_table_remove_item(&udf_idx, &node->link);
    208        
     208
    209209        assert(node->instance->open_nodes_count > 0);
    210210        node->instance->open_nodes_count--;
    211        
     211
    212212        free(node->fs_node);
    213213        free(node);
    214        
     214
    215215        fibril_mutex_unlock(&udf_idx_lock);
    216216        return EOK;
Note: See TracChangeset for help on using the changeset viewer.