From e08b3d3a48efb7bc63fbdbf9d320cd0348ff3464 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 14 Feb 2018 18:20:46 +1100 Subject: [PATCH] use %u instead of %d --- bin/tests/dst/dst_test.c | 18 +++++++++--------- util/copyrights | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/tests/dst/dst_test.c b/bin/tests/dst/dst_test.c index 879746a023..7fbfc24101 100644 --- a/bin/tests/dst/dst_test.c +++ b/bin/tests/dst/dst_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1999-2001, 2004, 2005, 2007, 2009, 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1999-2001, 2004, 2005, 2007, 2009, 2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -54,7 +54,7 @@ use(dst_key_t *key, isc_mem_t *mctx) { ret = dst_context_create3(key, mctx, DNS_LOGCATEGORY_GENERAL, ISC_TRUE, &ctx); if (ret != ISC_R_SUCCESS) { - printf("contextcreate(%d) returned: %s\n", dst_key_alg(key), + printf("contextcreate(%u) returned: %s\n", dst_key_alg(key), isc_result_totext(ret)); return; } @@ -87,7 +87,7 @@ use(dst_key_t *key, isc_mem_t *mctx) { return; } ret = dst_context_verify(ctx, &sigreg); - printf("verify(%d) returned: %s\n", dst_key_alg(key), + printf("verify(%u) returned: %s\n", dst_key_alg(key), isc_result_totext(ret)); dst_context_destroy(&ctx); } @@ -104,19 +104,19 @@ dns(dst_key_t *key, isc_mem_t *mctx) { isc_buffer_init(&buf1, buffer1, sizeof(buffer1)); ret = dst_key_todns(key, &buf1); - printf("todns(%d) returned: %s\n", dst_key_alg(key), + printf("todns(%u) returned: %s\n", dst_key_alg(key), isc_result_totext(ret)); if (ret != ISC_R_SUCCESS) return; ret = dst_key_fromdns(dst_key_name(key), dns_rdataclass_in, &buf1, mctx, &newkey); - printf("fromdns(%d) returned: %s\n", dst_key_alg(key), + printf("fromdns(%u) returned: %s\n", dst_key_alg(key), isc_result_totext(ret)); if (ret != ISC_R_SUCCESS) return; isc_buffer_init(&buf2, buffer2, sizeof(buffer2)); ret = dst_key_todns(newkey, &buf2); - printf("todns2(%d) returned: %s\n", dst_key_alg(key), + printf("todns2(%u) returned: %s\n", dst_key_alg(key), isc_result_totext(ret)); if (ret != ISC_R_SUCCESS) return; @@ -124,7 +124,7 @@ dns(dst_key_t *key, isc_mem_t *mctx) { isc_buffer_usedregion(&buf2, &r2); match = ISC_TF(r1.length == r2.length && memcmp(r1.base, r2.base, r1.length) == 0); - printf("compare(%d): %s\n", dst_key_alg(key), + printf("compare(%u): %s\n", dst_key_alg(key), match ? "true" : "false"); dst_key_free(&newkey); } @@ -194,11 +194,11 @@ dh(dns_name_t *name1, int id1, dns_name_t *name2, int id2, isc_mem_t *mctx) { { int i; printf("secrets don't match\n"); - printf("secret 1: %d bytes\n", r1.length); + printf("secret 1: %u bytes\n", r1.length); for (i = 0; i < (int) r1.length; i++) printf("%02x ", r1.base[i]); printf("\n"); - printf("secret 2: %d bytes\n", r2.length); + printf("secret 2: %u bytes\n", r2.length); for (i = 0; i < (int) r2.length; i++) printf("%02x ", r2.base[i]); printf("\n"); diff --git a/util/copyrights b/util/copyrights index 1ef4776c90..f38861804c 100644 --- a/util/copyrights +++ b/util/copyrights @@ -434,7 +434,7 @@ ./bin/tests/dst/Ktest.+003+49667.key.in X 2001,2004,2013 ./bin/tests/dst/Makefile.in MAKE 1999,2000,2001,2002,2004,2006,2007,2008,2009,2010,2012,2013,2014,2016,2017 ./bin/tests/dst/dst_2_data.in X 1999,2000,2001,2013 -./bin/tests/dst/dst_test.c C 1999,2000,2001,2004,2005,2007,2009,2012,2014,2015,2016 +./bin/tests/dst/dst_test.c C 1999,2000,2001,2004,2005,2007,2009,2012,2014,2015,2016,2018 ./bin/tests/dst/gsstest.c C 2006,2007,2009,2010,2011,2013,2014,2015,2016 ./bin/tests/dst/t2_data_1.in X 1999,2000,2001,2013 ./bin/tests/dst/t2_data_2.in X 1999,2000,2001,2013