forked from ariadne/pkgconf
inode cache: ensure we never use an unitilized struct stat
parent
e9b4c2c789
commit
2e855972dc
|
@ -89,8 +89,10 @@ pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter)
|
|||
node = calloc(sizeof(pkgconf_path_t), 1);
|
||||
node->path = strdup(text);
|
||||
#ifdef PKGCONF_CACHE_INODES
|
||||
node->handle_path = (void *)(intptr_t) st.st_ino;
|
||||
node->handle_device = (void *)(intptr_t) st.st_dev;
|
||||
if (filter) {
|
||||
node->handle_path = (void *)(intptr_t) st.st_ino;
|
||||
node->handle_device = (void *)(intptr_t) st.st_dev;
|
||||
}
|
||||
#endif
|
||||
|
||||
pkgconf_node_insert_tail(&node->lnode, node, dirlist);
|
||||
|
|
Loading…
Reference in New Issue