aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/misc.c')
-rw-r--r--lib/misc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/misc.c b/lib/misc.c
index c087f6a5..9d504b75 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -583,13 +583,9 @@ int md5_verify_password( char *password, char *hash )
md5_byte_t *pass_dec = NULL;
md5_byte_t pass_md5[16];
md5_state_t md5_state;
- int ret, i;
+ int ret = -1, i;
- if( base64_decode( hash, &pass_dec ) != 21 )
- {
- ret = -1;
- }
- else
+ if( base64_decode( hash, &pass_dec ) == 21 )
{
md5_init( &md5_state );
md5_append( &md5_state, (md5_byte_t*) password, strlen( password ) );