[PATCH 34/72] libmultipath: get_pgpolicy_name(): use "len" parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Wilck <mwilck@xxxxxxxx>

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 libmultipath/pgpolicies.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/pgpolicies.c b/libmultipath/pgpolicies.c
index 8f7c6b13..02cafdc7 100644
--- a/libmultipath/pgpolicies.c
+++ b/libmultipath/pgpolicies.c
@@ -54,7 +54,7 @@ int get_pgpolicy_name(char * buff, int len, int id)
 		s = "undefined";
 		break;
 	}
-	return snprintf(buff, POLICY_NAME_SIZE, "%s", s);
+	return snprintf(buff, len, "%s", s);
 }
 
 
-- 
2.23.0


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux