]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
volser: Make it clear what's copied from partList
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 20 Feb 2013 14:54:55 +0000 (14:54 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 26 Feb 2013 11:49:44 +0000 (03:49 -0800)
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)

Change-Id: I8c46ee5c220f0cb2b65943ad5faa80877ca46685
Reviewed-on: http://gerrit.openafs.org/9262
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/volser/volprocs.c

index 2fed208b35b4009a5b4631641ce9986f15b74595..17ae452593a7f6f333db1d069fc12717b0b61167 100644 (file)
@@ -1892,7 +1892,7 @@ XVolListPartitions(struct rx_call *acid, struct partEntries *pEntries)
        pEntries->partEntries_val = 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 {