apps: remove initial newline from mac output
authorPauli <pauli@openssl.org>
Fri, 7 May 2021 04:12:38 +0000 (14:12 +1000)
committerPauli <pauli@openssl.org>
Sat, 8 May 2021 12:15:56 +0000 (22:15 +1000)
Fixes #13247

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15189)

apps/mac.c
test/recipes/20-test_mac.t

index c722be31021f528e03f5400223e3377120eaa57d..dccbb681172bf571131965c0c42c98e453bf9fad 100644 (file)
@@ -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)
index ee5f77d361ef8380f8cf74d56e0ddf3ad1749575..7d754304c9fab9bf17fc0bc1af494a982e73da3e 100644 (file)
@@ -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;
         }