From: Michael Buesch Date: Mon, 29 Jul 2013 19:14:06 +0000 (+0200) Subject: Fix memset size argument error. X-Git-Tag: b43-fwcutter-018~1 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=9943900813b7815d316f997b96fa1e7715fbd5d1;p=b43-tools.git Fix memset size argument error. Detected by gcc: md5.c: In function ‘MD5Final’: md5.c:245:26: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] Signed-off-by: Michael Buesch --- diff --git a/fwcutter/md5.c b/fwcutter/md5.c index 9180964..e8270c3 100644 --- a/fwcutter/md5.c +++ b/fwcutter/md5.c @@ -242,5 +242,5 @@ void MD5Final(unsigned char *digest, struct MD5Context *ctx) MD5Transform(ctx->buf, ctx->u.in_u32); 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 */ }