diff mbox series

libmultipath: dm_get_maps(): remove spurious assignment

Message ID 20230627143350.18056-1-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series libmultipath: dm_get_maps(): remove spurious assignment | expand

Commit Message

Martin Wilck June 27, 2023, 2:33 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

Issue found by coverity:
  CID 393674:  Code maintainability issues  (UNUSED_VALUE)
  Assigning value "NULL" to "mpp" here, but that stored value is overwritten before it can be

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/devmapper.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Benjamin Marzinski July 6, 2023, 5:12 p.m. UTC | #1
On Tue, Jun 27, 2023 at 04:33:50PM +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> Issue found by coverity:
>   CID 393674:  Code maintainability issues  (UNUSED_VALUE)
>   Assigning value "NULL" to "mpp" here, but that stored value is overwritten before it can be
> 
> Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
>  libmultipath/devmapper.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> index a49db3b..248c373 100644
> --- a/libmultipath/devmapper.c
> +++ b/libmultipath/devmapper.c
> @@ -1359,7 +1359,6 @@ dm_get_maps (vector mp)
>  		}
>  
>  		vector_set_slot(mp, mpp);
> -		mpp = NULL;
>  next:
>  		next = names->next;
>  		names = (void *) names + next;
> -- 
> 2.41.0
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index a49db3b..248c373 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -1359,7 +1359,6 @@  dm_get_maps (vector mp)
 		}
 
 		vector_set_slot(mp, mpp);
-		mpp = NULL;
 next:
 		next = names->next;
 		names = (void *) names + next;