diff options
author | Michael Young <m.a.young@durham.ac.uk> | 2013-02-13 17:00:15 +0000 |
---|---|---|
committer | Michael Young <m.a.young@durham.ac.uk> | 2013-02-13 17:00:15 +0000 |
commit | d119301b5816b39b5ba722a2f8b301b37e8e34bd (patch) | |
tree | b61060cef8f2d520e2303df56cdc1f415c1ab88b /tools/blktap2 | |
parent | b61ed421d2c85b5b106c63f2c14f8aa162b282f0 (diff) | |
download | xen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.tar.gz xen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.tar.bz2 xen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.zip |
tools: Fix memset(&p,0,sizeof(p)) idiom in several places.
gcc 4.8 identifies several places where code of the form memset(x, 0,
sizeof(x)); is used incorrectly, meaning that less memory is set to
zero than required.
Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/blktap2')
-rw-r--r-- | tools/blktap2/drivers/md5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/blktap2/drivers/md5.c b/tools/blktap2/drivers/md5.c index 27a360eba1..e765832479 100644 --- a/tools/blktap2/drivers/md5.c +++ b/tools/blktap2/drivers/md5.c @@ -174,7 +174,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) MD5Transform(ctx->buf, (uint32_t *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } /* The four core functions - F1 is optimized somewhat */ |