commit 2029f63035e9d71dcdbb9a56253844b7ca109a8d
parent 3f2daeef0234d8788cbe0dfab60f2d8a6e6dbca7
Author: Michael Savage <mikejsavage@gmail.com>
Date: Fri, 16 Dec 2011 15:22:08 +0000
Use intermediate verified var for clarity
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/luabcrypt.c b/src/luabcrypt.c
@@ -48,7 +48,9 @@ static int luabcrypt_verify( lua_State *L )
char *encrypted = malloc( _PASSWORD_LEN );
bcrypt( key, digest, encrypted );
- lua_pushboolean( L, strncmp( encrypted, digest, _PASSWORD_LEN ) == 0 );
+ int verified = strncmp( encrypted, digest, _PASSWORD_LEN ) == 0;
+
+ lua_pushboolean( L, verified );
free( encrypted );