]> wimlib.net Git - wimlib/commitdiff
read_dentry_tree(): Use dentry_set_name()
authorEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jun 2014 04:40:34 +0000 (23:40 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jun 2014 04:54:51 +0000 (23:54 -0500)
Does the same thing but is shorter.

src/dentry.c

index c8d5734d17f3e1fe99eb13bc725da9eaea3f46b4..614eaf2df7cee0b73a2c5ff07a518e52cbbf980e 100644 (file)
@@ -1406,12 +1406,7 @@ read_dentry_tree(const u8 *buf, size_t buf_len,
                {
                        WARNING("The root directory has a nonempty name; "
                                "removing it.");
-                       FREE(root->file_name);
-                       FREE(root->short_name);
-                       root->file_name = NULL;
-                       root->short_name = NULL;
-                       root->file_name_nbytes = 0;
-                       root->short_name_nbytes = 0;
+                       dentry_set_name(root, NULL);
                }
 
                if (unlikely(!dentry_is_directory(root))) {