1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-25 18:50:51 +03:00

coverity: drop unused assignments

This commit is contained in:
Zdenek Kabelac 2016-02-23 19:57:56 +01:00
parent eaaae185b7
commit 9b92cb2760
3 changed files with 7 additions and 6 deletions

View 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;
}

View 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.");

View 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;
}