summaryrefslogtreecommitdiff
path: root/src/md5.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2013-03-26 10:11:04 +0100
committerAndreas Schwab <schwab@suse.de>2013-03-26 10:11:04 +0100
commit4fdcd20f51b515107a285968f3b0c1f6c68801d5 (patch)
treeda090c465cfac396b3010ca28bf46a1b6655f82d /src/md5.c
parent646a92ed488b5aaddaacbb825a03c1f4cbfc1d9e (diff)
downloadlibsolv-4fdcd20f51b515107a285968f3b0c1f6c68801d5.tar.gz
libsolv-4fdcd20f51b515107a285968f3b0c1f6c68801d5.tar.bz2
libsolv-4fdcd20f51b515107a285968f3b0c1f6c68801d5.zip
Fix misuses of memset
src/md5.c: In function 'sat_MD5_Final': src/md5.c:269:23: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] memset(ctx, 0, sizeof(ctx)); ^ examples/solv.c: In function 'read_repos': examples/solv.c:1616:27: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to remove the addressof? [-Werror=sizeof-pointer-memaccess] memset(&stb, 0, sizeof(&stb)); ^
Diffstat (limited to 'src/md5.c')
-rw-r--r--src/md5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/md5.c b/src/md5.c
index 85bbd6a..0431b50 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -266,5 +266,5 @@ void solv_MD5_Final(unsigned char *result, MD5_CTX *ctx)
result[14] = ctx->d >> 16;
result[15] = ctx->d >> 24;
- memset(ctx, 0, sizeof(ctx));
+ memset(ctx, 0, sizeof(*ctx));
}