Get rid of static variables in mount.c
[wimlib] / src / dentry.c
index 4a7b1f363db071c85050d862194d249ab5bc52ac..39505b756c81118f5927b70ab2e7728db3cebe38 100644 (file)
@@ -457,10 +457,10 @@ struct inode *wim_pathname_to_inode(WIMStruct *w, const char *path)
 {
        struct dentry *dentry;
        dentry = get_dentry(w, path);
-       if (!dentry)
-               return NULL;
-       else
+       if (dentry)
                return dentry->d_inode;
+       else
+               return NULL;
 }
 
 /* Returns the dentry that corresponds to the parent directory of @path, or NULL