Changeset 0c48e14 in mainline for uspace/srv/vfs/vfs_node.c


Ignore:
Timestamp:
2019-02-24T15:45:40Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
91bef446
Parents:
52b44c6
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-02 15:07:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-24 15:45:40)
Message:

Indicate and enforce constness of hash table key in certain functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_node.c

    r52b44c6 r0c48e14  
    6060#define KEY_INDEX       2
    6161
    62 static size_t nodes_key_hash(void *);
     62static size_t nodes_key_hash(const void *);
    6363static size_t nodes_hash(const ht_link_t *);
    64 static bool nodes_key_equal(void *, const ht_link_t *);
     64static bool nodes_key_equal(const void *, const ht_link_t *);
    6565static vfs_triplet_t node_triplet(vfs_node_t *node);
    6666
     
    280280}
    281281
    282 static size_t nodes_key_hash(void *key)
    283 {
    284         vfs_triplet_t *tri = key;
     282static size_t nodes_key_hash(const void *key)
     283{
     284        const vfs_triplet_t *tri = key;
    285285        size_t hash = hash_combine(tri->fs_handle, tri->index);
    286286        return hash_combine(hash, tri->service_id);
     
    294294}
    295295
    296 static bool nodes_key_equal(void *key, const ht_link_t *item)
    297 {
    298         vfs_triplet_t *tri = key;
     296static bool nodes_key_equal(const void *key, const ht_link_t *item)
     297{
     298        const vfs_triplet_t *tri = key;
    299299        vfs_node_t *node = hash_table_get_inst(item, vfs_node_t, nh_link);
    300300        return node->fs_handle == tri->fs_handle &&
Note: See TracChangeset for help on using the changeset viewer.