From: Pauli Date: Fri, 7 May 2021 04:12:38 +0000 (+1000) Subject: apps: remove initial newline from mac output X-Git-Tag: openssl-3.0.0-alpha17~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68f3fb051487581e3a424235b3d4f651cf558493;p=thirdparty%2Fopenssl.git apps: remove initial newline from mac output Fixes #13247 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15189) --- diff --git a/apps/mac.c b/apps/mac.c index c722be31021..dccbb681172 100644 --- a/apps/mac.c +++ b/apps/mac.c @@ -181,8 +181,6 @@ opthelp: if (out_bin) { BIO_write(out, buf, len); } else { - if (outfile == NULL) - BIO_printf(out,"\n"); for (i = 0; i < (int)len; ++i) BIO_printf(out, "%02X", buf[i]); if (outfile == NULL) diff --git a/test/recipes/20-test_mac.t b/test/recipes/20-test_mac.t index ee5f77d361e..7d754304c9f 100644 --- a/test/recipes/20-test_mac.t +++ b/test/recipes/20-test_mac.t @@ -137,10 +137,10 @@ sub compareline { # Not unlinking $tmpfile if (defined($expect)) { - if ($lines[1] =~ m|^\Q${expect}\E\R$|) { + if ($lines[0] =~ m|^\Q${expect}\E\R$|) { return 1; } else { - print "Got: $lines[1]"; + print "Got: $lines[0]"; print "Exp: $expect\n"; return 0; }