Skip to contentSkip to conversation

libmultipath: dm_get_maps(): remove spurious assignment

PATCH In review [email protected] 2 participants 2 messages Jun 27, 2023 – Jul 6, 2023 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmultipath: dm_get_maps(): remove spurious assignment

From: Martin Wilck <[email protected]>

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

---
 libmultipath/devmapper.c | 1 -
 1 file changed, 1 deletion(-)
libmultipath/devmapper.c +0 -1
index a49db3b..248c373 100644
@@ -1359,7 +1359,6 @@ dm_get_maps (vector mp)
 		}
 
 		vector_set_slot(mp, mpp);
-		mpp = NULL;
 next:
 		next = names->next;
 		names = (void *) names + next;
Signature · 6 lines
2.41.0

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Tue, Jun 27, 2023 at 04:33:50PM +0200, [email protected] wrote:

From: Martin Wilck <[email protected]>

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

Quoted 18 lines
---
 libmultipath/devmapper.c | 1 -
 1 file changed, 1 deletion(-)
libmultipath/devmapper.c +0 -1
index a49db3b..248c373 100644
@@ -1359,7 +1359,6 @@ dm_get_maps (vector mp)
 		}
 
 		vector_set_slot(mp, mpp);
-		mpp = NULL;
 next:
 		next = names->next;
 		names = (void *) names + next;
Signature · 1 line
2.41.0

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel