Changes in uspace/srv/fs/tmpfs/tmpfs_ops.c [6f5995f:5e801dc] in mainline
- File:
-
- 1 edited
-
uspace/srv/fs/tmpfs/tmpfs_ops.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/tmpfs/tmpfs_ops.c
r6f5995f r5e801dc 1 1 /* 2 * Copyright (c) 2026 Jiri Svoboda3 2 * Copyright (c) 2008 Jakub Jermar 4 3 * All rights reserved. … … 39 38 40 39 #include "tmpfs.h" 40 #include "../../vfs/vfs.h" 41 41 #include <macros.h> 42 42 #include <stdint.h> … … 159 159 } 160 160 161 static bool nodes_key_equal(const void *key_arg, size_t hash, 162 const ht_link_t *item) 161 static bool nodes_key_equal(const void *key_arg, const ht_link_t *item) 163 162 { 164 163 tmpfs_node_t *node = hash_table_get_inst(item, tmpfs_node_t, nh_link); … … 190 189 191 190 /** TMPFS nodes hash table operations. */ 192 consthash_table_ops_t nodes_ops = {191 hash_table_ops_t nodes_ops = { 193 192 .hash = nodes_hash, 194 193 .key_hash = nodes_key_hash, … … 277 276 ht_link_t *lnk = hash_table_find(&nodes, &key); 278 277 279 if (lnk == NULL) { 278 if (lnk) { 279 tmpfs_node_t *nodep; 280 nodep = hash_table_get_inst(lnk, tmpfs_node_t, nh_link); 281 *rfn = FS_NODE(nodep); 282 } else { 280 283 *rfn = NULL; 281 return EBADF; 282 } 283 284 tmpfs_node_t *nodep; 285 nodep = hash_table_get_inst(lnk, tmpfs_node_t, nh_link); 286 *rfn = FS_NODE(nodep); 284 } 287 285 return EOK; 288 286 } … … 322 320 323 321 rc = tmpfs_root_get(&rootfn, service_id); 324 assert(rc == EOK || rc == EBADF);325 if ( rootfn == NULL)322 assert(rc == EOK); 323 if (!rootfn) 326 324 nodep->index = TMPFS_SOME_ROOT; 327 325 else
Note:
See TracChangeset
for help on using the changeset viewer.
