From 7608dd1ef4e1d2656a9203e2091d53747a14679f Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 5 Sep 2022 21:06:31 +0000 Subject: Convert from %i to %d --- src/regress/lib/libcrypto/asn1/rfc5280time.c | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/regress/lib/libcrypto/asn1/rfc5280time.c') diff --git a/src/regress/lib/libcrypto/asn1/rfc5280time.c b/src/regress/lib/libcrypto/asn1/rfc5280time.c index 34e40439dc..f9b561e5c9 100644 --- a/src/regress/lib/libcrypto/asn1/rfc5280time.c +++ b/src/regress/lib/libcrypto/asn1/rfc5280time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rfc5280time.c,v 1.4 2015/10/30 15:52:55 miod Exp $ */ +/* $OpenBSD: rfc5280time.c,v 1.5 2022/09/05 21:06:31 tb Exp $ */ /* * Copyright (c) 2015 Joel Sing * Copyright (c) 2015 Bob Beck @@ -191,12 +191,12 @@ asn1_compare_str(int test_no, struct asn1_string_st *asn1str, const char *str) int length = strlen(str); if (asn1str->length != length) { - fprintf(stderr, "FAIL: test %i - string lengths differ " - "(%i != %i)\n", test_no, asn1str->length, length); + fprintf(stderr, "FAIL: test %d - string lengths differ " + "(%d != %d)\n", test_no, asn1str->length, length); return (1); } if (strncmp(asn1str->data, str, length) != 0) { - fprintf(stderr, "FAIL: test %i - strings differ " + fprintf(stderr, "FAIL: test %d - strings differ " "('%s' != '%s')\n", test_no, asn1str->data, str); return (1); } @@ -222,21 +222,21 @@ rfc5280_invtime_test(int test_no, struct rfc5280_time_test *att) if (ASN1_GENERALIZEDTIME_set_string(gt, att->str) != 0) { if (X509_cmp_time(gt, &now) != 0) { - fprintf(stderr, "FAIL: test %i - successfully parsed as GENTIME " + fprintf(stderr, "FAIL: test %d - successfully parsed as GENTIME " "string '%s'\n", test_no, att->str); goto done; } } if (ASN1_UTCTIME_set_string(ut, att->str) != 0) { if (X509_cmp_time(ut, &now) != 0) { - fprintf(stderr, "FAIL: test %i - successfully parsed as UTCTIME " + fprintf(stderr, "FAIL: test %d - successfully parsed as UTCTIME " "string '%s'\n", test_no, att->str); goto done; } } if (ASN1_TIME_set_string(t, att->str) != 0) { if (X509_cmp_time(t, &now) != 0) { - fprintf(stderr, "FAIL: test %i - successfully parsed as UTCTIME " + fprintf(stderr, "FAIL: test %d - successfully parsed as UTCTIME " "string '%s'\n", test_no, att->str); goto done; } @@ -264,7 +264,7 @@ rfc5280_gentime_test(int test_no, struct rfc5280_time_test *att) goto done; if (ASN1_GENERALIZEDTIME_set_string(gt, att->str) != 1) { - fprintf(stderr, "FAIL: test %i - failed to set string '%s'\n", + fprintf(stderr, "FAIL: test %d - failed to set string '%s'\n", test_no, att->str); goto done; } @@ -272,14 +272,14 @@ rfc5280_gentime_test(int test_no, struct rfc5280_time_test *att) goto done; if ((i = X509_cmp_time(gt, &att->time)) != -1) { - fprintf(stderr, "FAIL: test %i - X509_cmp_time failed - returned %d compared to %lld\n", + fprintf(stderr, "FAIL: test %d - X509_cmp_time failed - returned %d compared to %lld\n", test_no, i, att->time); goto done; } att->time--; if ((i = X509_cmp_time(gt, &att->time)) != 1) { - fprintf(stderr, "FAIL: test %i - X509_cmp_time failed - returned %d compared to %lld\n", + fprintf(stderr, "FAIL: test %d - X509_cmp_time failed - returned %d compared to %lld\n", test_no, i, att->time); goto done; } @@ -288,7 +288,7 @@ rfc5280_gentime_test(int test_no, struct rfc5280_time_test *att) ASN1_GENERALIZEDTIME_free(gt); if ((gt = ASN1_GENERALIZEDTIME_set(NULL, att->time)) == NULL) { - fprintf(stderr, "FAIL: test %i - failed to set time %lli\n", + fprintf(stderr, "FAIL: test %d - failed to set time %lld\n", test_no, (long long)att->time); goto done; } @@ -316,7 +316,7 @@ rfc5280_utctime_test(int test_no, struct rfc5280_time_test *att) goto done; if (ASN1_UTCTIME_set_string(ut, att->str) != 1) { - fprintf(stderr, "FAIL: test %i - failed to set string '%s'\n", + fprintf(stderr, "FAIL: test %d - failed to set string '%s'\n", test_no, att->str); goto done; } @@ -324,14 +324,14 @@ rfc5280_utctime_test(int test_no, struct rfc5280_time_test *att) goto done; if ((i = X509_cmp_time(ut, &att->time)) != -1) { - fprintf(stderr, "FAIL: test %i - X509_cmp_time failed - returned %d compared to %lld\n", + fprintf(stderr, "FAIL: test %d - X509_cmp_time failed - returned %d compared to %lld\n", test_no, i, att->time); goto done; } att->time--; if ((i = X509_cmp_time(ut, &att->time)) != 1) { - fprintf(stderr, "FAIL: test %i - X509_cmp_time failed - returned %d compared to %lld\n", + fprintf(stderr, "FAIL: test %d - X509_cmp_time failed - returned %d compared to %lld\n", test_no, i, att->time); goto done; } @@ -340,7 +340,7 @@ rfc5280_utctime_test(int test_no, struct rfc5280_time_test *att) ASN1_UTCTIME_free(ut); if ((ut = ASN1_UTCTIME_set(NULL, att->time)) == NULL) { - fprintf(stderr, "FAIL: test %i - failed to set time %lli\n", + fprintf(stderr, "FAIL: test %d - failed to set time %lld\n", test_no, (long long)att->time); goto done; } -- cgit v1.2.3-55-g6feb