From: Eric Biggers Date: Sun, 8 Jun 2014 03:43:00 +0000 (-0500) Subject: Remove some dead assignments X-Git-Tag: v1.7.0~47 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=af141a23c4d1540b8a64759bb68c7cd7ff054e72;hp=0b1ef651852d008d61771c3386c2922aeab1f462 Remove some dead assignments --- diff --git a/src/ntfs-3g_apply.c b/src/ntfs-3g_apply.c index e7557cf6..59edc363 100644 --- a/src/ntfs-3g_apply.c +++ b/src/ntfs-3g_apply.c @@ -627,7 +627,6 @@ ntfs_3g_create_nondirectory(struct wim_inode *inode, /* 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); diff --git a/src/ntfs-3g_capture.c b/src/ntfs-3g_capture.c index 80abca02..af9ebbee 100644 --- a/src/ntfs-3g_capture.c +++ b/src/ntfs-3g_capture.c @@ -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. */ - ret = 0; 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 */ - ret = 0; goto out_progress; } diff --git a/src/unix_capture.c b/src/unix_capture.c index 8fb4cba8..8b1e7934 100644 --- a/src/unix_capture.c +++ b/src/unix_capture.c @@ -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)) - { - ret = 0; goto out_progress; - } 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; - if (inode->i_nlink > 1) { - /* Already seen this inode? */ - ret = 0; + /* Already seen this inode? */ + if (inode->i_nlink > 1) goto out_progress; - } #ifdef HAVE_STAT_NANOSECOND_PRECISION inode->i_creation_time = timespec_to_wim_timestamp(stbuf.st_mtim); diff --git a/src/update_image.c b/src/update_image.c index 27f921dc..040afb6b 100644 --- a/src/update_image.c +++ b/src/update_image.c @@ -1152,7 +1152,6 @@ execute_update_commands(WIMStruct *wim, 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, diff --git a/src/win32_capture.c b/src/win32_capture.c index 27b3794f..bc5422e8 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -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)) - { - ret = 0; goto out_progress; - } /* 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. */ - ret = 0; goto out_progress; }