From: Richard Levitte Date: Mon, 1 Aug 2016 11:07:48 +0000 (+0200) Subject: Fix return values of do_passwd() in apps/passwd.c X-Git-Tag: OpenSSL_1_1_0-pre6~37 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2a600d7afd55ed71076e9c41469f6bba72d1f313;p=oweals%2Fopenssl.git Fix return values of do_passwd() in apps/passwd.c do_passwd() was returning 0 on success and 1 on failure. However, those values were interpreted the other way around. The fix that makes the most sense is to change what do_passwd() returns. Reviewed-by: Rich Salz --- diff --git a/apps/passwd.c b/apps/passwd.c index 31c4eef55a..e2c90960e5 100644 --- a/apps/passwd.c +++ b/apps/passwd.c @@ -496,10 +496,10 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, BIO_printf(out, "%s\t%s\n", hash, passwd); else BIO_printf(out, "%s\n", hash); - return 0; + return 1; end: - return 1; + return 0; } #else