]> 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)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 22 Mar 2013 12:55:12 +0000 (05:55 -0700)
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 <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 00601179625ffb71461bbcc46629791895cf4793)

Change-Id: I878011efe4baae897e5d4f875c8e02378da38587
Reviewed-on: http://gerrit.openafs.org/9360
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/volser/volprocs.c

index d8b965c64cdb30c8d1aab46a13de67379b8bf8f7..16865b50c606170b397a914c7e2f9e0a58eec97a 100644 (file)
@@ -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 {