From 4e9e404dea8f0d07714f8ba668735ac0999d7934 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 20 Feb 2013 14:54:55 +0000 Subject: [PATCH] volser: Make it clear what's copied from partList XVolListPartitions uses partList to maintain a list of partition IDs - it does not use the partFlags field. Make it clear when we populate the partEntries field that we are only copying the partition list. Caught by coverity (#986030) Reviewed-on: http://gerrit.openafs.org/9262 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00601179625ffb71461bbcc46629791895cf4793) Change-Id: I878011efe4baae897e5d4f875c8e02378da38587 Reviewed-on: http://gerrit.openafs.org/9360 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- src/volser/volprocs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index d8b965c64..16865b50c 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -1901,7 +1901,7 @@ XVolListPartitions(struct rx_call *acid, struct partEntries *pEntries) pEntries->partEntries_val = (afs_int32 *) malloc(j * sizeof(int)); if (!pEntries->partEntries_val) return ENOMEM; - memcpy((char *)pEntries->partEntries_val, (char *)&partList, + memcpy(pEntries->partEntries_val, partList.partId, j * sizeof(int)); pEntries->partEntries_len = j; } else { -- 2.39.5