]> wimlib.net Git - wimlib/commitdiff
Remove some dead assignments
authorEric Biggers <ebiggers3@gmail.com>
Sun, 8 Jun 2014 03:43:00 +0000 (22:43 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 8 Jun 2014 03:43:00 +0000 (22:43 -0500)
src/ntfs-3g_apply.c
src/ntfs-3g_capture.c
src/unix_capture.c
src/update_image.c
src/win32_capture.c

index e7557cf663a9712609c264a40449f390a6aad237..59edc3631fa7a42e4654d0c57babbd412c9b2f58 100644 (file)
@@ -627,7 +627,6 @@ ntfs_3g_create_nondirectory(struct wim_inode *inode,
 
        /* Create additional links if present.  */
        next = inode->i_extraction_aliases.next;
 
        /* Create additional links if present.  */
        next = inode->i_extraction_aliases.next;
-       ret = 0;
        do {
                dentry = list_entry(next, struct wim_dentry,
                                    d_extraction_alias_node);
        do {
                dentry = list_entry(next, struct wim_dentry,
                                    d_extraction_alias_node);
index 80abca02c8143864bb3493ed6eeea15930c4add7..af9ebbee05cc5df78ed0f231cdbf97cdf280dd91 100644 (file)
@@ -537,7 +537,6 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
        if (should_exclude_path(path, path_len, params->config)) {
                /* Exclude a file or directory tree based on the capture
                 * configuration file.  */
        if (should_exclude_path(path, path_len, params->config)) {
                /* Exclude a file or directory tree based on the capture
                 * configuration file.  */
-               ret = 0;
                goto out_progress;
        }
 
                goto out_progress;
        }
 
@@ -577,7 +576,6 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
 
        if (inode->i_nlink > 1) {
                /* Shared inode; nothing more to do */
 
        if (inode->i_nlink > 1) {
                /* Shared inode; nothing more to do */
-               ret = 0;
                goto out_progress;
        }
 
                goto out_progress;
        }
 
index 8fb4cba886af80b0b7abed9070add7d78dd1b8b6..8b1e793413c7faf3f56b96b77c50ffbfca56d8cd 100644 (file)
@@ -337,10 +337,7 @@ unix_build_dentry_tree_recursive(struct wim_dentry **tree_ret,
        if (should_exclude_path(full_path + params->capture_root_nchars,
                                full_path_len - params->capture_root_nchars,
                                params->config))
        if (should_exclude_path(full_path + params->capture_root_nchars,
                                full_path_len - params->capture_root_nchars,
                                params->config))
-       {
-               ret = 0;
                goto out_progress;
                goto out_progress;
-       }
 
        if (params->add_flags & (WIMLIB_ADD_FLAG_DEREFERENCE |
                                 WIMLIB_ADD_FLAG_ROOT))
 
        if (params->add_flags & (WIMLIB_ADD_FLAG_DEREFERENCE |
                                 WIMLIB_ADD_FLAG_ROOT))
@@ -385,11 +382,9 @@ unix_build_dentry_tree_recursive(struct wim_dentry **tree_ret,
 
        inode = tree->d_inode;
 
 
        inode = tree->d_inode;
 
-       if (inode->i_nlink > 1) {
-               /* Already seen this inode?  */
-               ret = 0;
+       /* Already seen this inode?  */
+       if (inode->i_nlink > 1)
                goto out_progress;
                goto out_progress;
-       }
 
 #ifdef HAVE_STAT_NANOSECOND_PRECISION
        inode->i_creation_time = timespec_to_wim_timestamp(stbuf.st_mtim);
 
 #ifdef HAVE_STAT_NANOSECOND_PRECISION
        inode->i_creation_time = timespec_to_wim_timestamp(stbuf.st_mtim);
index 27f921dcccb99b6d4dbec2bc9e5f8f75251faa25..040afb6b732b8fe4b56daeb5fab7f70df97b213d 100644 (file)
@@ -1152,7 +1152,6 @@ execute_update_commands(WIMStruct *wim,
                                goto rollback;
                }
 
                                goto rollback;
                }
 
-               ret = WIMLIB_ERR_INVALID_PARAM;
                switch (cmds[i].op) {
                case WIMLIB_UPDATE_OP_ADD:
                        ret = execute_add_command(j, wim, &cmds[i], inode_table,
                switch (cmds[i].op) {
                case WIMLIB_UPDATE_OP_ADD:
                        ret = execute_add_command(j, wim, &cmds[i], inode_table,
index 27b3794fd436073d23d120800272ec1f50623941..bc5422e85c7feaeebfcd2989aaea0f93b6fdb802 100644 (file)
@@ -1094,10 +1094,7 @@ winnt_build_dentry_tree_recursive(struct wim_dentry **root_ret,
        if (should_exclude_path(full_path + params->capture_root_nchars,
                                full_path_nchars - params->capture_root_nchars,
                                params->config))
        if (should_exclude_path(full_path + params->capture_root_nchars,
                                full_path_nchars - params->capture_root_nchars,
                                params->config))
-       {
-               ret = 0;
                goto out_progress;
                goto out_progress;
-       }
 
        /* Open the file.  */
        status = winnt_openat(cur_dir,
 
        /* Open the file.  */
        status = winnt_openat(cur_dir,
@@ -1256,7 +1253,6 @@ winnt_build_dentry_tree_recursive(struct wim_dentry **root_ret,
        if (inode->i_nlink > 1) {
                /* Shared inode (hard link); skip reading per-inode information.
                 */
        if (inode->i_nlink > 1) {
                /* Shared inode (hard link); skip reading per-inode information.
                 */
-               ret = 0;
                goto out_progress;
        }
 
                goto out_progress;
        }