From af0781aa48df51bddf482810156b65b53d10b441 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Thu, 2 Aug 2012 16:04:53 +0200 Subject: [PATCH] memset() is not needed, and size argument was wrong anyway Signed-off-by: Tobias Ulmer --- generic/lsha1.c | 1 - 1 file changed, 1 deletion(-) diff --git a/generic/lsha1.c b/generic/lsha1.c index 885f8a0..6bdbf4d 100644 --- a/generic/lsha1.c +++ b/generic/lsha1.c @@ -104,7 +104,6 @@ static const luaL_reg sha1_meta[] = static int sha1_init(lua_State *L) { SHA1_CTX *ctx = (SHA1_CTX *)lua_newuserdata(L, sizeof(SHA1_CTX)); - memset(ctx, 0, sizeof(ctx)); /* really needed? */ SHA1Init(ctx); if(luaL_newmetatable(L, LUA_OBJECT_ID)) { -- 2.39.5