From d6bc43ab52c57cac7aedf6473ebcf3676b8fe5a1 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 9 Apr 2013 13:12:18 +1000 Subject: [PATCH 1/9] update --- util/copyrights | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/util/copyrights b/util/copyrights index 8cb472b0c8..f4b355d400 100644 --- a/util/copyrights +++ b/util/copyrights @@ -1404,7 +1404,7 @@ ./bin/tests/system/tsiggss/prereq.sh SH 2010,2011,2012 ./bin/tests/system/tsiggss/setup.sh SH 2010,2011,2012 ./bin/tests/system/tsiggss/tests.sh X 2010,2011 -./bin/tests/system/unknown/clean.sh SH 2000,2001,2004,2007,2012 +./bin/tests/system/unknown/clean.sh SH 2000,2001,2004,2007,2012,2013 ./bin/tests/system/unknown/large.out X 2012 ./bin/tests/system/unknown/ns1/broken1.db ZONE 2000,2001,2004,2007 ./bin/tests/system/unknown/ns1/broken2.db ZONE 2000,2001,2004,2007 @@ -1420,7 +1420,8 @@ ./bin/tests/system/unknown/ns3/named.conf CONF-C 2012 ./bin/tests/system/unknown/ns3/sign.sh SH 2012 ./bin/tests/system/unknown/setup.sh SH 2012 -./bin/tests/system/unknown/tests.sh SH 2000,2001,2004,2007,2011,2012 +./bin/tests/system/unknown/tests.sh SH 2000,2001,2004,2007,2011,2012,2013 +./bin/tests/system/unknown/zones/nan.bad ZONE 2013 ./bin/tests/system/upforwd/ans4/ans.pl PERL 2011,2012 ./bin/tests/system/upforwd/clean.sh SH 2000,2001,2004,2007,2011,2012 ./bin/tests/system/upforwd/knowngood.after1 X 2000,2001 @@ -2287,7 +2288,7 @@ ./lib/dns/include/dns/lookup.h C 2000,2001,2004,2005,2006,2007,2009 ./lib/dns/include/dns/master.h C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2011,2012 ./lib/dns/include/dns/masterdump.h C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2011 -./lib/dns/include/dns/message.h C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2012 +./lib/dns/include/dns/message.h C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2012,2013 ./lib/dns/include/dns/name.h C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2009,2010,2011,2012 ./lib/dns/include/dns/ncache.h C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2013 ./lib/dns/include/dns/nsec.h C 1999,2000,2001,2003,2004,2005,2006,2007,2008,2011,2012 @@ -2326,7 +2327,7 @@ ./lib/dns/include/dns/tsec.h C 2009,2010,2012 ./lib/dns/include/dns/tsig.h C 1999,2000,2001,2002,2004,2005,2006,2007,2009,2010,2011 ./lib/dns/include/dns/ttl.h C 1999,2000,2001,2004,2005,2006,2007 -./lib/dns/include/dns/types.h C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 +./lib/dns/include/dns/types.h C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013 ./lib/dns/include/dns/update.h C 2011 ./lib/dns/include/dns/validator.h C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2013 ./lib/dns/include/dns/version.h C 2001,2004,2005,2006,2007 From c4d2f352d37605b98ad875c7a60474d54bb113d4 Mon Sep 17 00:00:00 2001 From: Tinderbox User Date: Tue, 9 Apr 2013 23:45:38 +0000 Subject: [PATCH 2/9] update copyright notice --- bin/tests/system/unknown/clean.sh | 2 +- bin/tests/system/unknown/tests.sh | 2 +- bin/tests/system/unknown/zones/nan.bad | 14 ++++++++++++++ lib/dns/include/dns/message.h | 4 ++-- lib/dns/include/dns/types.h | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/bin/tests/system/unknown/clean.sh b/bin/tests/system/unknown/clean.sh index a4c54943a6..d86a869bdf 100644 --- a/bin/tests/system/unknown/clean.sh +++ b/bin/tests/system/unknown/clean.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004, 2007, 2012, 2013 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000, 2001 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any diff --git a/bin/tests/system/unknown/tests.sh b/bin/tests/system/unknown/tests.sh index aeb1a3dd08..55c7ca6db5 100644 --- a/bin/tests/system/unknown/tests.sh +++ b/bin/tests/system/unknown/tests.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2004, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004, 2007, 2011-2013 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000, 2001 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any diff --git a/bin/tests/system/unknown/zones/nan.bad b/bin/tests/system/unknown/zones/nan.bad index d8578b31cb..26d9f37fdc 100644 --- a/bin/tests/system/unknown/zones/nan.bad +++ b/bin/tests/system/unknown/zones/nan.bad @@ -1 +1,15 @@ +; Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") +; +; Permission to use, copy, modify, and/or distribute this software for any +; purpose with or without fee is hereby granted, provided that the above +; copyright notice and this permission notice appear in all copies. +; +; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +; PERFORMANCE OF THIS SOFTWARE. + @ 0 IN TYPE353 \# cat 010101010101010101 diff --git a/lib/dns/include/dns/message.h b/lib/dns/include/dns/message.h index d4e472cf5e..a6862faab6 100644 --- a/lib/dns/include/dns/message.h +++ b/lib/dns/include/dns/message.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010, 2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010, 2012, 2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -1363,7 +1363,7 @@ dns_message_buildopt(dns_message_t *msg, dns_rdataset_t **opt, /*%< * Built a opt record. * - * Requires: + * Requires: * \li msg be a valid message. * \li opt to be a non NULL and *opt to be NULL. * diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h index 8edbd52aff..76167c2f88 100644 --- a/lib/dns/include/dns/types.h +++ b/lib/dns/include/dns/types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any From 0f5734786a690f2363788f178e70f353e4b01cf8 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 10 Apr 2013 21:35:36 +1000 Subject: [PATCH 3/9] add sleep 1 to loop (cherry picked from commit cc444c73d5d0b635ba4704abde3773c110c3a7a2) --- bin/tests/system/dlzexternal/tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/tests/system/dlzexternal/tests.sh b/bin/tests/system/dlzexternal/tests.sh index 062a49e1c0..e8caddcd1b 100644 --- a/bin/tests/system/dlzexternal/tests.sh +++ b/bin/tests/system/dlzexternal/tests.sh @@ -66,6 +66,7 @@ for i in 0 1 2 3 4 5 6 7 8 9; do ret=0 grep 'dlz_example: shutting down zone example.nil' ns1/named.run > /dev/null 2>&1 || ret=1 [ "$ret" -eq 0 ] && break + sleep 1 done [ "$ret" -eq 0 ] || echo "I:failed" status=`expr $status + $ret` From 7bb8b43fb15d41dd45d4e0ce314f3ab2382ae412 Mon Sep 17 00:00:00 2001 From: Tinderbox User Date: Wed, 10 Apr 2013 23:30:07 +0000 Subject: [PATCH 4/9] newcopyrights --- util/copyrights | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/copyrights b/util/copyrights index f4b355d400..e4d0fff784 100644 --- a/util/copyrights +++ b/util/copyrights @@ -812,7 +812,7 @@ ./bin/tests/system/dlzexternal/ns1/named.conf.in CONF-C 2011 ./bin/tests/system/dlzexternal/prereq.sh SH 2010,2011,2012 ./bin/tests/system/dlzexternal/setup.sh SH 2010,2012 -./bin/tests/system/dlzexternal/tests.sh X 2010,2011,2012 +./bin/tests/system/dlzexternal/tests.sh X 2010,2011,2012,2013 ./bin/tests/system/dname/clean.sh SH 2011,2012 ./bin/tests/system/dname/ns1/named.conf CONF-C 2011 ./bin/tests/system/dname/ns1/root.db ZONE 2011 From 53f675154c93b9e8d4e96deeee6cc4669ef40582 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 11 Apr 2013 17:07:50 +1000 Subject: [PATCH 5/9] silence coverity warnings (cherry picked from commit 45b727f651aba2cbd2f9db51ccfb4b541520a5de) --- bin/named/unix/dlz_dlopen_driver.c | 10 ++++++---- bin/tests/db_test.c | 5 +++-- bin/tests/shutdown_test.c | 8 ++++++-- bin/tests/sock_test.c | 8 ++++++-- bin/tests/task_test.c | 8 ++++++-- bin/tests/timer_test.c | 8 ++++++-- lib/dns/client.c | 10 ++++++---- lib/irs/getaddrinfo.c | 11 ++++++----- 8 files changed, 45 insertions(+), 23 deletions(-) diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index a96495ebf2..19e49f824d 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -252,7 +252,9 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], } /* Initialize the lock */ - isc_mutex_init(&cd->lock); + result = isc_mutex_init(&cd->lock); + if (result != ISC_R_SUCCESS) + goto failed; /* Open the library */ dlopen_flags = RTLD_NOW|RTLD_GLOBAL; @@ -356,11 +358,11 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], failed: dlopen_log(ISC_LOG_ERROR, "dlz_dlopen of '%s' failed", dlzname); - if (cd->dl_path) + if (cd->dl_path != NULL) isc_mem_free(mctx, cd->dl_path); - if (cd->dlzname) + if (cd->dlzname != NULL) isc_mem_free(mctx, cd->dlzname); - if (dlopen_flags) + if (dlopen_flags != 0) (void) isc_mutex_destroy(&cd->lock); #ifdef HAVE_DLCLOSE if (cd->dl_handle) diff --git a/bin/tests/db_test.c b/bin/tests/db_test.c index d72bf4f313..4024bc59f7 100644 --- a/bin/tests/db_test.c +++ b/bin/tests/db_test.c @@ -610,10 +610,11 @@ main(int argc, char *argv[]) { } else if (strstr(s, "!V") == s) { DBI_CHECK(dbi); v = atoi(&s[2]); - if (v >= dbi->rcount) { + if (v >= dbi->rcount || v < 0) { printf("unknown open version %d\n", v); continue; - } else if (dbi->rversions[v] == NULL) { + } + if (dbi->rversions[v] == NULL) { printf("version %d is not open\n", v); continue; } diff --git a/bin/tests/shutdown_test.c b/bin/tests/shutdown_test.c index 32ad5fed9c..91bb0477f6 100644 --- a/bin/tests/shutdown_test.c +++ b/bin/tests/shutdown_test.c @@ -174,9 +174,13 @@ main(int argc, char *argv[]) { RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS); - if (argc > 1) + if (argc > 1) { workers = atoi(argv[1]); - else + if (workers < 1) + workers = 1; + if (workers > 8192) + workers = 8192; + } else workers = 2; printf("%d workers\n", workers); diff --git a/bin/tests/sock_test.c b/bin/tests/sock_test.c index 8f33a7ed49..f6d2a39222 100644 --- a/bin/tests/sock_test.c +++ b/bin/tests/sock_test.c @@ -263,9 +263,13 @@ main(int argc, char *argv[]) { isc_result_t result; int pf; - if (argc > 1) + if (argc > 1) { workers = atoi(argv[1]); - else + if (workers < 1) + workers = 1; + if (workers > 8192) + workers = 8192; + } else workers = 2; printf("%d workers\n", workers); diff --git a/bin/tests/task_test.c b/bin/tests/task_test.c index e3ff26b56c..2e162b6d1e 100644 --- a/bin/tests/task_test.c +++ b/bin/tests/task_test.c @@ -69,9 +69,13 @@ main(int argc, char *argv[]) { isc_timer_t *ti1, *ti2; struct isc_interval interval; - if (argc > 1) + if (argc > 1) { workers = atoi(argv[1]); - else + if (workers < 1) + workers = 1; + if (workers > 8192) + workers = 8192; + } else workers = 2; printf("%d workers\n", workers); diff --git a/bin/tests/timer_test.c b/bin/tests/timer_test.c index 2825dc58e9..cb5459ccf2 100644 --- a/bin/tests/timer_test.c +++ b/bin/tests/timer_test.c @@ -102,9 +102,13 @@ main(int argc, char *argv[]) { isc_time_t expires, now; isc_interval_t interval; - if (argc > 1) + if (argc > 1) { workers = atoi(argv[1]); - else + if (workers < 1) + workers = 1; + if (workers > 8192) + workers = 8192; + } else workers = 2; printf("%d workers\n", workers); diff --git a/lib/dns/client.c b/lib/dns/client.c index 4952c40bfb..182ae21afe 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -2018,8 +2018,9 @@ resolveaddr_done(isc_task_t *task, isc_event_t *event) { switch (family) { case AF_INET: dns_rdataset_current(rdataset, &rdata); - dns_rdata_tostruct(&rdata, &rdata_a, - NULL); + result = dns_rdata_tostruct(&rdata, &rdata_a, + NULL); + RUNTIME_CHECK(result == ISC_R_SUCCESS); isc_sockaddr_fromin(sa, &rdata_a.in_addr, 53); @@ -2027,8 +2028,9 @@ resolveaddr_done(isc_task_t *task, isc_event_t *event) { break; case AF_INET6: dns_rdataset_current(rdataset, &rdata); - dns_rdata_tostruct(&rdata, &rdata_aaaa, - NULL); + result = dns_rdata_tostruct(&rdata, &rdata_aaaa, + NULL); + RUNTIME_CHECK(result == ISC_R_SUCCESS); isc_sockaddr_fromin6(sa, &rdata_aaaa.in6_addr, 53); diff --git a/lib/irs/getaddrinfo.c b/lib/irs/getaddrinfo.c index 4e86706fe5..fc62da12ac 100644 --- a/lib/irs/getaddrinfo.c +++ b/lib/irs/getaddrinfo.c @@ -784,9 +784,9 @@ process_answer(isc_task_t *task, isc_event_t *event) { switch (family) { case AF_INET: dns_rdataset_current(rdataset, &rdata); - dns_rdata_tostruct(&rdata, &rdata_a, - NULL); - + result = dns_rdata_tostruct(&rdata, &rdata_a, + NULL); + RUNTIME_CHECK(result == ISC_R_SUCCESS); SIN(ai->ai_addr)->sin_port = resstate->head->ai_port; memcpy(&SIN(ai->ai_addr)->sin_addr, @@ -795,8 +795,9 @@ process_answer(isc_task_t *task, isc_event_t *event) { break; case AF_INET6: dns_rdataset_current(rdataset, &rdata); - dns_rdata_tostruct(&rdata, &rdata_aaaa, - NULL); + result = dns_rdata_tostruct(&rdata, &rdata_aaaa, + NULL); + RUNTIME_CHECK(result == ISC_R_SUCCESS); SIN6(ai->ai_addr)->sin6_port = resstate->head->ai_port; memcpy(&SIN6(ai->ai_addr)->sin6_addr, From db8272a8f091220401cd0bccb054186a0317432a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 11 Apr 2013 18:11:12 +1000 Subject: [PATCH 6/9] don't call dns_message_destroy in make_querymessage (cherry picked from commit da87a34cd23a4637978b654d5398c8e8a16c4a9e) --- lib/export/samples/nsprobe.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/export/samples/nsprobe.c b/lib/export/samples/nsprobe.c index 869b194717..54cc7146c8 100644 --- a/lib/export/samples/nsprobe.c +++ b/lib/export/samples/nsprobe.c @@ -282,8 +282,6 @@ make_querymessage(dns_message_t *message, dns_name_t *qname0, dns_message_puttempname(message, &qname); if (qrdataset != NULL) dns_message_puttemprdataset(message, &qrdataset); - if (message != NULL) - dns_message_destroy(&message); return (result); } From fd92502ea8ccf61bb8386af1b2821120d961b07d Mon Sep 17 00:00:00 2001 From: Tinderbox User Date: Thu, 11 Apr 2013 23:30:09 +0000 Subject: [PATCH 7/9] newcopyrights --- util/copyrights | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/util/copyrights b/util/copyrights index e4d0fff784..3edc89755d 100644 --- a/util/copyrights +++ b/util/copyrights @@ -210,7 +210,7 @@ ./bin/named/tkeyconf.c C 1999,2000,2001,2004,2005,2006,2007,2009,2010,2012 ./bin/named/tsigconf.c C 1999,2000,2001,2004,2005,2006,2007,2009,2011,2012 ./bin/named/unix/Makefile.in MAKE 1999,2000,2001,2004,2007,2009,2011,2012 -./bin/named/unix/dlz_dlopen_driver.c C 2011,2012 +./bin/named/unix/dlz_dlopen_driver.c C 2011,2012,2013 ./bin/named/unix/include/named/os.h C 1999,2000,2001,2002,2004,2005,2007,2008,2009 ./bin/named/unix/os.c C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011 ./bin/named/update.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 @@ -358,7 +358,7 @@ ./bin/tests/db/dns_db_origin_1.data X 1999,2000,2001 ./bin/tests/db/dns_db_origin_data X 1999,2000,2001 ./bin/tests/db/t_db.c C 1999,2000,2001,2004,2005,2007,2009,2011,2012 -./bin/tests/db_test.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012 +./bin/tests/db_test.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2013 ./bin/tests/dnssec-signzone/Kexample.com.+005+07065.key X 2009 ./bin/tests/dnssec-signzone/Kexample.com.+005+07065.private X 2009 ./bin/tests/dnssec-signzone/Kexample.com.+005+23362.key X 2009 @@ -519,9 +519,9 @@ ./bin/tests/resolver/t_resolver.c C 2011,2012 ./bin/tests/rwlock_test.c C 1998,1999,2000,2001,2004,2005,2007 ./bin/tests/serial_test.c C 1999,2000,2001,2003,2004,2007 -./bin/tests/shutdown_test.c C 1998,1999,2000,2001,2004,2007,2011 +./bin/tests/shutdown_test.c C 1998,1999,2000,2001,2004,2007,2011,2013 ./bin/tests/sig0_test.c C 2000,2001,2004,2005,2007,2008,2009,2012 -./bin/tests/sock_test.c C 1998,1999,2000,2001,2004,2007,2008,2012 +./bin/tests/sock_test.c C 1998,1999,2000,2001,2004,2007,2008,2012,2013 ./bin/tests/sockaddr/Makefile.in MAKE 1999,2000,2001,2002,2004,2007,2009,2012 ./bin/tests/sockaddr/t_sockaddr.c C 1999,2000,2001,2004,2007 ./bin/tests/startperf/README X 2011 @@ -1524,10 +1524,10 @@ ./bin/tests/system/zonechecks/nxdomain.db ZONE 2004,2007 ./bin/tests/system/zonechecks/tests.sh SH 2004,2007,2009,2012 ./bin/tests/t_api.pl PERL 1999,2000,2001,2004,2007,2012 -./bin/tests/task_test.c C 1998,1999,2000,2001,2004,2007 +./bin/tests/task_test.c C 1998,1999,2000,2001,2004,2007,2013 ./bin/tests/tasks/Makefile.in MAKE 1998,1999,2000,2001,2002,2004,2007,2009,2012 ./bin/tests/tasks/t_tasks.c C 1998,1999,2000,2001,2004,2005,2007,2009,2011 -./bin/tests/timer_test.c C 1998,1999,2000,2001,2004,2007 +./bin/tests/timer_test.c C 1998,1999,2000,2001,2004,2007,2013 ./bin/tests/timers/Makefile.in MAKE 1999,2000,2001,2002,2004,2007,2009,2012 ./bin/tests/timers/t_timers.c C 1999,2000,2001,2004,2007,2008,2009,2011 ./bin/tests/virtual-time/Makefile.in MAKE 2010,2012 @@ -2627,7 +2627,7 @@ ./lib/export/samples/.gitignore X 2012 ./lib/export/samples/Makefile-postinstall.in MAKE 2009,2012 ./lib/export/samples/Makefile.in MAKE 2009,2012,2013 -./lib/export/samples/nsprobe.c C 2009,2010,2011,2012 +./lib/export/samples/nsprobe.c C 2009,2010,2011,2012,2013 ./lib/export/samples/sample-async.c C 2009 ./lib/export/samples/sample-gai.c C 2009,2012 ./lib/export/samples/sample-request.c C 2009,2012 @@ -2638,7 +2638,7 @@ ./lib/irs/context.c C 2009 ./lib/irs/dnsconf.c C 2009,2012 ./lib/irs/gai_strerror.c C 2009 -./lib/irs/getaddrinfo.c C 2009,2012 +./lib/irs/getaddrinfo.c C 2009,2012,2013 ./lib/irs/getnameinfo.c C 2009,2011,2012,2013 ./lib/irs/include/Makefile.in MAKE 2009,2012 ./lib/irs/include/irs/Makefile.in MAKE 2009,2012 From 515586b36937e807c87a7a69812716659bee6f1a Mon Sep 17 00:00:00 2001 From: Tinderbox User Date: Thu, 11 Apr 2013 23:45:37 +0000 Subject: [PATCH 8/9] update copyright notice --- bin/named/unix/dlz_dlopen_driver.c | 4 ++-- bin/tests/db_test.c | 2 +- bin/tests/shutdown_test.c | 2 +- bin/tests/sock_test.c | 2 +- bin/tests/task_test.c | 2 +- bin/tests/timer_test.c | 2 +- lib/dns/client.c | 4 ++-- lib/export/samples/nsprobe.c | 2 +- lib/irs/getaddrinfo.c | 6 +++--- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index 19e49f824d..2ba8a028a3 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2011-2013 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -253,7 +253,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], /* Initialize the lock */ result = isc_mutex_init(&cd->lock); - if (result != ISC_R_SUCCESS) + if (result != ISC_R_SUCCESS) goto failed; /* Open the library */ diff --git a/bin/tests/db_test.c b/bin/tests/db_test.c index 4024bc59f7..d3d8b4a543 100644 --- a/bin/tests/db_test.c +++ b/bin/tests/db_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007-2009, 2011-2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any diff --git a/bin/tests/shutdown_test.c b/bin/tests/shutdown_test.c index 91bb0477f6..e0d6ae76ab 100644 --- a/bin/tests/shutdown_test.c +++ b/bin/tests/shutdown_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007, 2011 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2007, 2011, 2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any diff --git a/bin/tests/sock_test.c b/bin/tests/sock_test.c index f6d2a39222..82a7e77555 100644 --- a/bin/tests/sock_test.c +++ b/bin/tests/sock_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2007, 2008, 2012, 2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any diff --git a/bin/tests/task_test.c b/bin/tests/task_test.c index 2e162b6d1e..4a22ca4850 100644 --- a/bin/tests/task_test.c +++ b/bin/tests/task_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2007, 2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any diff --git a/bin/tests/timer_test.c b/bin/tests/timer_test.c index cb5459ccf2..06205b7db6 100644 --- a/bin/tests/timer_test.c +++ b/bin/tests/timer_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2007, 2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any diff --git a/lib/dns/client.c b/lib/dns/client.c index 182ae21afe..fc551cf9df 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -2019,7 +2019,7 @@ resolveaddr_done(isc_task_t *task, isc_event_t *event) { case AF_INET: dns_rdataset_current(rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rdata_a, - NULL); + NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); isc_sockaddr_fromin(sa, &rdata_a.in_addr, @@ -2029,7 +2029,7 @@ resolveaddr_done(isc_task_t *task, isc_event_t *event) { case AF_INET6: dns_rdataset_current(rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rdata_aaaa, - NULL); + NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); isc_sockaddr_fromin6(sa, &rdata_aaaa.in6_addr, diff --git a/lib/export/samples/nsprobe.c b/lib/export/samples/nsprobe.c index 54cc7146c8..a97046e307 100644 --- a/lib/export/samples/nsprobe.c +++ b/lib/export/samples/nsprobe.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2009-2013 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/lib/irs/getaddrinfo.c b/lib/irs/getaddrinfo.c index fc62da12ac..1de540f296 100644 --- a/lib/irs/getaddrinfo.c +++ b/lib/irs/getaddrinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -785,7 +785,7 @@ process_answer(isc_task_t *task, isc_event_t *event) { case AF_INET: dns_rdataset_current(rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rdata_a, - NULL); + NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); SIN(ai->ai_addr)->sin_port = resstate->head->ai_port; @@ -796,7 +796,7 @@ process_answer(isc_task_t *task, isc_event_t *event) { case AF_INET6: dns_rdataset_current(rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rdata_aaaa, - NULL); + NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); SIN6(ai->ai_addr)->sin6_port = resstate->head->ai_port; From 635e9124cbfa2bc459fb6015b8c5083d3e6ef4ee Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 12 Apr 2013 14:07:25 +1000 Subject: [PATCH 9/9] silence hpux compiler warnings --- lib/export/samples/nsprobe.c | 24 ++++++++++++------------ lib/export/samples/sample-async.c | 2 +- lib/export/samples/sample-gai.c | 2 +- lib/export/samples/sample-request.c | 2 +- lib/export/samples/sample-update.c | 2 +- lib/export/samples/sample.c | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/export/samples/nsprobe.c b/lib/export/samples/nsprobe.c index a97046e307..1d7ed3b4c9 100644 --- a/lib/export/samples/nsprobe.c +++ b/lib/export/samples/nsprobe.c @@ -291,7 +291,7 @@ make_querymessage(dns_message_t *message, dns_name_t *qname0, static inline void increment_entry(unsigned long *entryp) { (*entryp)++; - INSIST(*entryp != 0); /* check overflow */ + INSIST(*entryp != 0U); /* check overflow */ } static void @@ -390,57 +390,57 @@ update_stat(struct probe_trans *trans) { } /* Update per domain statistics */ - if (local_stat.ignore > 0) { + if (local_stat.ignore > 0U) { if (verbose_level > 0) printf("%s:ignore\n", trans->domain); increment_entry(&domain_stat.ignore); err_count++; } - if (local_stat.nxdomain > 0) { + if (local_stat.nxdomain > 0U) { if (verbose_level > 0) printf("%s:nxdomain\n", trans->domain); increment_entry(&domain_stat.nxdomain); err_count++; } - if (local_stat.othererr > 0) { + if (local_stat.othererr > 0U) { if (verbose_level > 0) printf("%s:othererr\n", trans->domain); increment_entry(&domain_stat.othererr); err_count++; } - if (local_stat.multiplesoa > 0) { + if (local_stat.multiplesoa > 0U) { if (verbose_level > 0) printf("%s:multiplesoa\n", trans->domain); increment_entry(&domain_stat.multiplesoa); err_count++; } - if (local_stat.multiplecname > 0) { + if (local_stat.multiplecname > 0U) { if (verbose_level > 0) printf("%s:multiplecname\n", trans->domain); increment_entry(&domain_stat.multiplecname); err_count++; } - if (local_stat.brokenanswer > 0) { + if (local_stat.brokenanswer > 0U) { if (verbose_level > 0) printf("%s:brokenanswer\n", trans->domain); increment_entry(&domain_stat.brokenanswer); err_count++; } - if (local_stat.lame > 0) { + if (local_stat.lame > 0U) { if (verbose_level > 0) printf("%s:lame\n", trans->domain); increment_entry(&domain_stat.lame); err_count++; } - if (err_count > 1) + if (err_count > 1U) increment_entry(&multiple_error_domains); /* * We regard the domain as valid if and only if no authoritative server * has a problem and at least one server is known to be valid. */ - if (local_stat.valid > 0 && err_count == 0) { + if (local_stat.valid > 0U && err_count == 0U) { if (verbose_level > 1) printf("%s:valid\n", trans->domain); increment_entry(&domain_stat.valid); @@ -450,7 +450,7 @@ update_stat(struct probe_trans *trans) { * If the domain has no available server or all servers have the * 'unknown' result, the domain's result is also regarded as unknown. */ - if (local_stat.valid == 0 && err_count == 0) { + if (local_stat.valid == 0U && err_count == 0U) { if (verbose_level > 1) printf("%s:unknown\n", trans->domain); increment_entry(&domain_stat.unknown); @@ -1216,5 +1216,5 @@ main(int argc, char *argv[]) { isc_app_ctxfinish(actx); ctxs_destroy(&mctx, &actx, &taskmgr, &socketmgr, &timermgr); - exit(0); + return (0); } diff --git a/lib/export/samples/sample-async.c b/lib/export/samples/sample-async.c index e646e795e9..8adb4fd618 100644 --- a/lib/export/samples/sample-async.c +++ b/lib/export/samples/sample-async.c @@ -398,5 +398,5 @@ main(int argc, char *argv[]) { isc_app_ctxfinish(query_actx); ctxs_destroy(&mctx, &query_actx, &taskmgr, &socketmgr, &timermgr); - exit(0); + return (0); } diff --git a/lib/export/samples/sample-gai.c b/lib/export/samples/sample-gai.c index 1aa4c311c6..06c2736164 100644 --- a/lib/export/samples/sample-gai.c +++ b/lib/export/samples/sample-gai.c @@ -73,5 +73,5 @@ main(int argc, char *argv[]) { do_gai(AF_INET6, argv[1]); do_gai(AF_UNSPEC, argv[1]); - exit(0); + return (0); } diff --git a/lib/export/samples/sample-request.c b/lib/export/samples/sample-request.c index 46629f0328..6371e4d14a 100644 --- a/lib/export/samples/sample-request.c +++ b/lib/export/samples/sample-request.c @@ -261,5 +261,5 @@ main(int argc, char *argv[]) { dns_client_destroy(&client); dns_lib_shutdown(); - exit(0); + return (0); } diff --git a/lib/export/samples/sample-update.c b/lib/export/samples/sample-update.c index aa20b58707..7437d305f5 100644 --- a/lib/export/samples/sample-update.c +++ b/lib/export/samples/sample-update.c @@ -305,7 +305,7 @@ main(int argc, char *argv[]) { dns_client_destroy(&client); dns_lib_shutdown(); - exit(0); + return (0); } /* diff --git a/lib/export/samples/sample.c b/lib/export/samples/sample.c index 1b3f33ff3d..b121a0db44 100644 --- a/lib/export/samples/sample.c +++ b/lib/export/samples/sample.c @@ -380,5 +380,5 @@ main(int argc, char *argv[]) { isc_mem_destroy(&keymctx); dns_lib_shutdown(); - exit(0); + return (0); }