From: Simon Wilkinson Date: Fri, 30 Mar 2012 18:31:10 +0000 (+0100) Subject: vol: Call memset with the correct size X-Git-Tag: upstream/1.8.0_pre1^2~2609 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=408afc5690fc8ac3b6942983765ab36e63d2534d;p=packages%2Fo%2Fopenafs.git vol: Call memset with the correct size Call memset with the size of the structure we're initialising to 0, and not the size of the pointer to that structure. Caught by clang's new warnings. Change-Id: I8cded7bed4e289e9603778e06873f94fd3924aa8 Reviewed-on: http://gerrit.openafs.org/7083 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 390c202f0..0b1fa2687 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -3323,7 +3323,7 @@ DistilVnodeEssence(struct SalvInfo *salvinfo, VolumeId rwVId, if (class != vLarge) { VnodeId vnodeNumber = bitNumberToVnodeNumber(vnodeIndex, class); vip->nAllocatedVnodes--; - memset(vnode, 0, sizeof(vnode)); + memset(vnode, 0, sizeof(*vnode)); IH_IWRITE(salvinfo->vnodeInfo[vSmall].handle, vnodeIndexOffset(vcp, vnodeNumber), (char *)&vnode, sizeof(vnode));