]> git.e2factory.org Git - e2factory.git/commitdiff
memset() is not needed, and size argument was wrong anyway
authorTobias Ulmer <tu@emlix.com>
Thu, 2 Aug 2012 14:04:53 +0000 (16:04 +0200)
committerTobias Ulmer <tu@emlix.com>
Thu, 2 Aug 2012 14:04:53 +0000 (16:04 +0200)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/lsha1.c

index 885f8a03c748fdaa4272c405d257306fff53c5fe..6bdbf4d968fad43ee0b9bbee6b46d4ac2afa2eeb 100644 (file)
@@ -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)) {