From 408afc5690fc8ac3b6942983765ab36e63d2534d Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 30 Mar 2012 19:31:10 +0100 Subject: [PATCH] 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 --- src/vol/vol-salvage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 390c202f0c..0b1fa2687c 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));