Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/cdfs/cdfs_ops.c

    r48cc66f r7ae01d5  
    11/*
    2  * Copyright (c) 2026 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * Copyright (c) 2011 Martin Decky
    44 * All rights reserved.
     
    298298}
    299299
    300 static bool nodes_key_equal(const void *k, size_t hash, const ht_link_t *item)
     300static bool nodes_key_equal(const void *k, const ht_link_t *item)
    301301{
    302302        cdfs_node_t *node = hash_table_get_inst(item, cdfs_node_t, nh_link);
     
    341341
    342342        ht_link_t *link = hash_table_find(&nodes, &key);
    343         if (!link) {
     343        if (link) {
     344                cdfs_node_t *node =
     345                    hash_table_get_inst(link, cdfs_node_t, nh_link);
     346
     347                *rfn = FS_NODE(node);
     348        } else
    344349                *rfn = NULL;
    345                 return EBADF;
    346         }
    347 
    348         cdfs_node_t *node = hash_table_get_inst(link, cdfs_node_t, nh_link);
    349         *rfn = FS_NODE(node);
     350
    350351        return EOK;
    351352}
     
    394395        errno_t rc = cdfs_root_get(&rootfn, fs->service_id);
    395396
    396         assert(rc == EOK || rc == EBADF);
     397        assert(rc == EOK);
    397398
    398399        if (!rootfn)
     
    13531354                cdfs_node_t *node = hash_table_get_inst(item, cdfs_node_t, nh_link);
    13541355
    1355                 /* Remove closed, but root node is always in memory. */
    1356                 if (!node->opened && node->index != 0) {
     1356                if (!node->opened) {
    13571357                        hash_table_remove_item(&nodes, item);
    13581358
Note: See TracChangeset for help on using the changeset viewer.