]> sourceware.org Git - lvm2.git/commitdiff
coverity: drop unused assignments
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Feb 2016 18:57:56 +0000 (19:57 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Feb 2016 20:40:16 +0000 (21:40 +0100)
tools/lvrename.c
tools/lvresize.c
tools/vgrename.c

index 1f6e829246eb6f8fdb31b94f052b842e590f8e77..e37d8aa0f60b6fe55996f888f3c9a311205a5038 100644 (file)
@@ -81,7 +81,7 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv)
        char *lv_name_old, *lv_name_new;
        const char *vg_name, *vg_name_new, *vg_name_old;
        char *st;
-       int ret = ECMD_FAILED;
+       int ret;
 
        if (argc == 3) {
                vg_name = skip_dev_dir(cmd, argv[0], NULL);
@@ -169,6 +169,6 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv)
                              _lvrename_single);
 
        destroy_processing_handle(cmd, handle);
-       return ret;
 
+       return ret;
 }
index af6ce07b73b72fcbab8fdf838bc92bbf905477ae..2c2df366c1d372b74e0bac5ab5d2725e0fd161a0 100644 (file)
@@ -199,10 +199,12 @@ int lvresize(struct cmd_context *cmd, int argc, char **argv)
 {
        struct processing_handle *handle;
        struct lvresize_params lp = { 0 };
-       int ret = ECMD_FAILED;
+       int ret;
 
-       if (!_lvresize_params(cmd, argc, argv, &lp))
+       if (!_lvresize_params(cmd, argc, argv, &lp)) {
+               stack;
                return EINVALID_CMD_LINE;
+       }
 
        if (!(handle = init_processing_handle(cmd))) {
                log_error("Failed to initialize processing handle.");
index 633999e693bf08f01080ead895761a2f517a0962..e5af820885320e29346857086039542fb75b7d21 100644 (file)
@@ -38,7 +38,6 @@ static int _vgrename_single(struct cmd_context *cmd, const char *vg_name,
                            struct volume_group *vg, struct processing_handle *handle)
 {
        struct vgrename_params *vp = (struct vgrename_params *) handle->custom_handle;
-       struct lvmcache_vginfo *vginfo;
        char old_path[NAME_LEN];
        char new_path[NAME_LEN];
        struct id id;
@@ -72,7 +71,7 @@ static int _vgrename_single(struct cmd_context *cmd, const char *vg_name,
         */
        lvmcache_seed_infos_from_lvmetad(cmd);
 
-       if ((vginfo = lvmcache_vginfo_from_vgname(vp->vg_name_new, NULL))) {
+       if (lvmcache_vginfo_from_vgname(vp->vg_name_new, NULL)) {
                log_error("New VG name \"%s\" already exists", vp->vg_name_new);
                return ECMD_FAILED;
        }
This page took 1.110587 seconds and 5 git commands to generate.