rootfs.cpp: Replace undefined behaviour with offsetof.
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
parent
c7cb9b2f59
commit
e3e0255008
@ -377,7 +377,7 @@ rootfs_mount(fs_volume* volume, const char* device, uint32 flags,
|
|||||||
rw_lock_init(&fs->lock, "rootfs");
|
rw_lock_init(&fs->lock, "rootfs");
|
||||||
|
|
||||||
fs->vnode_list_hash = hash_init(ROOTFS_HASH_SIZE,
|
fs->vnode_list_hash = hash_init(ROOTFS_HASH_SIZE,
|
||||||
(addr_t)&vnode->all_next - (addr_t)vnode, &rootfs_vnode_compare_func,
|
offsetof(rootfs_vnode, all_next), &rootfs_vnode_compare_func,
|
||||||
&rootfs_vnode_hash_func);
|
&rootfs_vnode_hash_func);
|
||||||
if (fs->vnode_list_hash == NULL) {
|
if (fs->vnode_list_hash == NULL) {
|
||||||
err = B_NO_MEMORY;
|
err = B_NO_MEMORY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user