summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/base64/base64test.c
diff options
context:
space:
mode:
authortb <>2022-09-05 21:06:31 +0000
committertb <>2022-09-05 21:06:31 +0000
commit7608dd1ef4e1d2656a9203e2091d53747a14679f (patch)
treecda70a930b6e462786beda42d51e130bb873b6c3 /src/regress/lib/libcrypto/base64/base64test.c
parent0b315a15aa761d629b59c54becaeecc44627e42e (diff)
downloadopenbsd-7608dd1ef4e1d2656a9203e2091d53747a14679f.tar.gz
openbsd-7608dd1ef4e1d2656a9203e2091d53747a14679f.tar.bz2
openbsd-7608dd1ef4e1d2656a9203e2091d53747a14679f.zip
Convert from %i to %d
Diffstat (limited to 'src/regress/lib/libcrypto/base64/base64test.c')
-rw-r--r--src/regress/lib/libcrypto/base64/base64test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/regress/lib/libcrypto/base64/base64test.c b/src/regress/lib/libcrypto/base64/base64test.c
index a05bc10754..9ab2a40703 100644
--- a/src/regress/lib/libcrypto/base64/base64test.c
+++ b/src/regress/lib/libcrypto/base64/base64test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: base64test.c,v 1.9 2021/03/21 14:06:29 tb Exp $ */ 1/* $OpenBSD: base64test.c,v 1.10 2022/09/05 21:06:31 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -304,13 +304,13 @@ base64_encoding_test(int test_no, struct base64_test *bt, int test_nl)
304 304
305 len = BIO_write(bio_mem, bt->in, bt->in_len); 305 len = BIO_write(bio_mem, bt->in, bt->in_len);
306 if (len != bt->in_len) { 306 if (len != bt->in_len) {
307 fprintf(stderr, "FAIL: test %i - only wrote %zi out of %zi " 307 fprintf(stderr, "FAIL: test %d - only wrote %zd out of %zd "
308 "characters\n", test_no, len, bt->in_len); 308 "characters\n", test_no, len, bt->in_len);
309 failure = 1; 309 failure = 1;
310 goto done; 310 goto done;
311 } 311 }
312 if (BIO_flush(bio_mem) < 0) { 312 if (BIO_flush(bio_mem) < 0) {
313 fprintf(stderr, "FAIL: test %i - flush failed\n", test_no); 313 fprintf(stderr, "FAIL: test %d - flush failed\n", test_no);
314 failure = 1; 314 failure = 1;
315 goto done; 315 goto done;
316 } 316 }
@@ -333,14 +333,14 @@ base64_encoding_test(int test_no, struct base64_test *bt, int test_nl)
333 goto done; 333 goto done;
334 334
335 if (len != b64len) { 335 if (len != b64len) {
336 fprintf(stderr, "FAIL: test %i - encoding resulted in %zi " 336 fprintf(stderr, "FAIL: test %d - encoding resulted in %zd "
337 "characters instead of %zi\n", test_no, len, b64len); 337 "characters instead of %zd\n", test_no, len, b64len);
338 failure = 1; 338 failure = 1;
339 goto done; 339 goto done;
340 } 340 }
341 341
342 if (memcmp(buf, out, b64len) != 0) { 342 if (memcmp(buf, out, b64len) != 0) {
343 fprintf(stderr, "FAIL: test %i - encoding differs:\n", test_no); 343 fprintf(stderr, "FAIL: test %d - encoding differs:\n", test_no);
344 fprintf(stderr, " encoding: "); 344 fprintf(stderr, " encoding: ");
345 for (i = 0; i < len; i++) 345 for (i = 0; i < len; i++)
346 fprintf(stderr, "%c", out[i]); 346 fprintf(stderr, "%c", out[i]);
@@ -400,8 +400,8 @@ base64_decoding_test(int test_no, struct base64_test *bt, int test_nl)
400 */ 400 */
401 len = BIO_read(bio_mem, buf, BUF_SIZE); 401 len = BIO_read(bio_mem, buf, BUF_SIZE);
402 if (len != bt->valid_len && (bt->in_len != 0 || len != -1)) { 402 if (len != bt->valid_len && (bt->in_len != 0 || len != -1)) {
403 fprintf(stderr, "FAIL: test %i - decoding resulted in %zi " 403 fprintf(stderr, "FAIL: test %d - decoding resulted in %zd "
404 "characters instead of %zi\n", test_no, len, bt->valid_len); 404 "characters instead of %zd\n", test_no, len, bt->valid_len);
405 fprintf(stderr, " input: "); 405 fprintf(stderr, " input: ");
406 for (i = 0; i < inlen; i++) 406 for (i = 0; i < inlen; i++)
407 fprintf(stderr, "%c", input[i]); 407 fprintf(stderr, "%c", input[i]);
@@ -419,7 +419,7 @@ base64_decoding_test(int test_no, struct base64_test *bt, int test_nl)
419 goto done; 419 goto done;
420 420
421 if (memcmp(bt->in, buf, bt->in_len) != 0) { 421 if (memcmp(bt->in, buf, bt->in_len) != 0) {
422 fprintf(stderr, "FAIL: test %i - decoding differs:\n", test_no); 422 fprintf(stderr, "FAIL: test %d - decoding differs:\n", test_no);
423 fprintf(stderr, " decoding: "); 423 fprintf(stderr, " decoding: ");
424 for (i = 0; i < len; i++) 424 for (i = 0; i < len; i++)
425 fprintf(stderr, "0x%x ", buf[i]); 425 fprintf(stderr, "0x%x ", buf[i]);