Blob Blame History Raw
From 8d109010f022ac75e383ac74d1961c0c63a16c3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Tue, 19 Feb 2019 10:59:43 +0100
Subject: [PATCH] test-alg-hmac-sha1: Use fputs() instead of puts().

puts() appends a newline character at the
end of the output, while fputs() does not.
---
 test-alg-hmac-sha1.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/test-alg-hmac-sha1.c b/test-alg-hmac-sha1.c
index 167f0b4..5a87c7b 100644
--- a/test-alg-hmac-sha1.c
+++ b/test-alg-hmac-sha1.c
@@ -162,15 +162,15 @@ main (void)
       if (strcmp (dbuf, test->expect) != 0)
         {
           n = 1;
-          printf ("\nkey=");
-          puts (test->key);
-          puts (", data=");
-          puts (test->data);
-          printf (",\nresult=");
-          puts (dbuf);
-          puts (": ");
-          puts (test->expect);
-          printf ("\n");
+          fputs ("\nkey=", stdout);
+          fputs (test->key, stdout);
+          fputs (", data=", stdout);
+          fputs (test->data, stdout);
+          fputs (",\nresult=", stdout);
+          fputs (dbuf, stdout);
+          fputs (": ", stdout);
+          fputs (test->expect, stdout);
+          fputs ("\n", stdout);
         }
     }
   return n;