summaryrefslogtreecommitdiffstats
path: root/test/testutil/format_output.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2018-09-30 17:16:07 -0400
committerViktor Dukhovni <openssl-users@dukhovni.org>2018-12-09 22:02:50 -0500
commitec91206fbe5e14731f9c9fa0b3dd859854d3e8b9 (patch)
treee1c053a68daab0d8027e864ae3e558e0a92188bf /test/testutil/format_output.c
parent5db120dc351177173bb25e963be095404c31fbce (diff)
Add a format attribute to the format functions and fix the broken format
strings. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'test/testutil/format_output.c')
-rw-r--r--test/testutil/format_output.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/testutil/format_output.c b/test/testutil/format_output.c
index ead03841d5..7f5147516e 100644
--- a/test/testutil/format_output.c
+++ b/test/testutil/format_output.c
@@ -31,9 +31,9 @@ static void test_diff_header(const char *left, const char *right)
static void test_string_null_empty(const char *m, char c)
{
if (m == NULL)
- test_printf_stderr("% 4s %c NULL\n", "", c);
+ test_printf_stderr("%4s %c NULL\n", "", c);
else
- test_printf_stderr("% 4u:%c ''\n", 0u, c);
+ test_printf_stderr("%4u:%c ''\n", 0u, c);
}
static void test_fail_string_common(const char *prefix, const char *file,
@@ -94,18 +94,18 @@ static void test_fail_string_common(const char *prefix, const char *file,
bdiff[i] = '\0';
}
if (n1 == n2 && !diff) {
- test_printf_stderr("% 4u: '%s'\n", cnt, n2 > n1 ? b2 : b1);
+ test_printf_stderr("%4u: '%s'\n", cnt, n2 > n1 ? b2 : b1);
} else {
if (cnt == 0 && (m1 == NULL || *m1 == '\0'))
test_string_null_empty(m1, '-');
else if (n1 > 0)
- test_printf_stderr("% 4u:- '%s'\n", cnt, b1);
+ test_printf_stderr("%4u:- '%s'\n", cnt, b1);
if (cnt == 0 && (m2 == NULL || *m2 == '\0'))
test_string_null_empty(m2, '+');
else if (n2 > 0)
- test_printf_stderr("% 4u:+ '%s'\n", cnt, b2);
+ test_printf_stderr("%4u:+ '%s'\n", cnt, b2);
if (diff && i > 0)
- test_printf_stderr("% 4s %s\n", "", bdiff);
+ test_printf_stderr("%4s %s\n", "", bdiff);
}
m1 += n1;
m2 += n2;
@@ -410,7 +410,7 @@ void test_output_bignum(const char *name, const BIGNUM *bn)
static void test_memory_null_empty(const unsigned char *m, char c)
{
if (m == NULL)
- test_printf_stderr("% 4s %c%s\n", "", c, "NULL");
+ test_printf_stderr("%4s %c%s\n", "", c, "NULL");
else
test_printf_stderr("%04x %c%s\n", 0u, c, "empty");
}
@@ -494,7 +494,7 @@ static void test_fail_memory_common(const char *prefix, const char *file,
else if (n2 > 0)
test_printf_stderr("%04x:+%s\n", cnt, b2);
if (diff && i > 0)
- test_printf_stderr("% 4s %s\n", "", bdiff);
+ test_printf_stderr("%4s %s\n", "", bdiff);
}
m1 += n1;
m2 += n2;