]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3069. [cleanup] Silence warnings messages from clang static analysis.
authorMark Andrews <marka@isc.org>
Fri, 11 Mar 2011 06:47:09 +0000 (06:47 +0000)
committerMark Andrews <marka@isc.org>
Fri, 11 Mar 2011 06:47:09 +0000 (06:47 +0000)
                        [RT #20256]

76 files changed:
CHANGES
bin/check/named-checkconf.c
bin/confgen/ddns-confgen.c
bin/confgen/rndc-confgen.c
bin/dig/dig.c
bin/dig/dighost.c
bin/dig/host.c
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-signzone.c
bin/named/controlconf.c
bin/named/interfacemgr.c
bin/named/main.c
bin/named/query.c
bin/named/server.c
bin/named/statschannel.c
bin/named/update.c
bin/named/zoneconf.c
bin/nsupdate/nsupdate.c
bin/tests/db/t_db.c
bin/tests/master/t_master.c
bin/tests/names/t_names.c
bin/tests/rbt/t_rbt.c
bin/tests/tasks/t_tasks.c
bin/tests/timers/t_timers.c
lib/bind9/check.c
lib/dns/adb.c
lib/dns/client.c
lib/dns/diff.c
lib/dns/dispatch.c
lib/dns/dlz.c
lib/dns/dnssec.c
lib/dns/journal.c
lib/dns/master.c
lib/dns/masterdump.c
lib/dns/message.c
lib/dns/name.c
lib/dns/nsec.c
lib/dns/nsec3.c
lib/dns/openssldsa_link.c
lib/dns/rbt.c
lib/dns/rbtdb.c
lib/dns/rdata.c
lib/dns/rdataset.c
lib/dns/request.c
lib/dns/resolver.c
lib/dns/sdlz.c
lib/dns/tkey.c
lib/dns/ttl.c
lib/dns/validator.c
lib/dns/view.c
lib/dns/xfrin.c
lib/dns/zone.c
lib/export/samples/nsprobe.c
lib/irs/getnameinfo.c
lib/irs/resconf.c
lib/isc/httpd.c
lib/isc/include/isc/util.h
lib/isc/log.c
lib/isc/netaddr.c
lib/isc/radix.c
lib/isc/rwlock.c
lib/isc/sha1.c
lib/isc/sha2.c
lib/isc/string.c
lib/isc/timer.c
lib/isc/unix/dir.c
lib/isc/unix/socket.c
lib/isc/unix/time.c
lib/isc/win32/dir.c
lib/isccfg/namedconf.c
lib/isccfg/parser.c
lib/lwres/assert_p.h
lib/lwres/herror.c
lib/lwres/lwconfig.c
lib/lwres/print.c

diff --git a/CHANGES b/CHANGES
index e35b99b2a8b16e94133205bbd9a7b0273c6ceb92..8655857522022e980f4195d228a2ca1ad0e71ac0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3069.  [cleanup]       Silence warnings messages from clang static analysis.
+                       [RT #20256]
+
 3068.  [bug]           Named failed to build with a OpenSSL without engine
                        support. [RT #23473]
 
index 7523448755d5bc08be3cd264d6ff45aab74db624..e9351539ecd856b6c986e8c7fbcb0513ead4e881 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named-checkconf.c,v 1.54 2010/09/07 01:49:08 marka Exp $ */
+/* $Id: named-checkconf.c,v 1.54.62.1 2011/03/11 06:46:58 marka Exp $ */
 
 /*! \file */
 
@@ -190,7 +190,7 @@ configure_zone(const char *vclass, const char *view,
                if (obj != NULL)
                        maps[i++] = obj;
        }
-       maps[i++] = NULL;
+       maps[i] = NULL;
 
        cfg_map_get(zoptions, "type", &typeobj);
        if (typeobj == NULL)
index 44f9c27dfc6b194b397286f439c098686b7716cb..1ea882135474fe73b19e41844bd5d61138300996 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ddns-confgen.c,v 1.9 2009/09/29 15:06:05 fdupont Exp $ */
+/* $Id: ddns-confgen.c,v 1.9.308.1 2011/03/11 06:46:58 marka Exp $ */
 
 /*! \file */
 
@@ -160,6 +160,7 @@ main(int argc, char **argv) {
 
        argc -= isc_commandline_index;
        argv += isc_commandline_index;
+       POST(argv);
 
        if (self_domain != NULL && zone != NULL)
                usage(1);       /* -s and -z cannot coexist */
index cea8cc7da7215cf98414179b1fb92413ad105e11..b12dbadbda944ac73fc45a5ab490045bbbd40dab 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rndc-confgen.c,v 1.5 2009/09/29 15:06:05 fdupont Exp $ */
+/* $Id: rndc-confgen.c,v 1.5.308.1 2011/03/11 06:46:58 marka Exp $ */
 
 /*! \file */
 
@@ -200,6 +200,7 @@ main(int argc, char **argv) {
 
        argc -= isc_commandline_index;
        argv += isc_commandline_index;
+       POST(argv);
 
        if (argc > 0)
                usage(1);
index 6a16ea14443e8dc7f387463a3a0f9636e2475b06..5312c4e5a7e2aed75388a42ae494b3cf9cdbc3b2 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dig.c,v 1.237.124.2 2011/02/28 01:19:57 tbox Exp $ */
+/* $Id: dig.c,v 1.237.124.3 2011/03/11 06:46:58 marka Exp $ */
 
 /*! \file */
 
@@ -477,8 +477,6 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
        if (!query->lookup->comments)
                flags |= DNS_MESSAGETEXTFLAG_NOCOMMENTS;
 
-       result = ISC_R_SUCCESS;
-
        result = isc_buffer_allocate(mctx, &buf, len);
        check_result(result, "isc_buffer_allocate");
 
@@ -1566,7 +1564,6 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                                (isc_textregion_t *)&tr);
                                        if (result == ISC_R_SUCCESS &&
                                            rdtype == dns_rdatatype_ixfr) {
-                                               result = DNS_R_UNKNOWN;
                                                fprintf(stderr, ";; Warning, "
                                                        "ixfr requires a "
                                                        "serial number\n");
index d566bf05142f064b0b80629810f924f91f37aeb7..071e05985a369669e47e0f6c57500e3c91370d46 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dighost.c,v 1.336.22.3 2011/02/28 01:19:57 tbox Exp $ */
+/* $Id: dighost.c,v 1.336.22.4 2011/03/11 06:46:58 marka Exp $ */
 
 /*! \file
  *  \note
@@ -1804,17 +1804,25 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
        if (numLookups > 1) {
                isc_uint32_t i, j;
                dig_serverlist_t my_server_list;
+               dig_server_t *next;
 
                ISC_LIST_INIT(my_server_list);
 
-               for (i = numLookups; i > 0; i--) {
+               i = numLookups;
+               for (srv = ISC_LIST_HEAD(lookup->my_server_list);
+                    srv != NULL;
+                    srv = ISC_LIST_HEAD(lookup->my_server_list)) {
+                       INSIST(i > 0);
                        isc_random_get(&j);
                        j %= i;
-                       srv = ISC_LIST_HEAD(lookup->my_server_list);
-                       while (j-- > 0)
-                               srv = ISC_LIST_NEXT(srv, link);
+                       next = ISC_LIST_NEXT(srv, link);
+                       while (j-- > 0 && next != NULL) {
+                               srv = next;
+                               next = ISC_LIST_NEXT(srv, link);
+                       }
                        ISC_LIST_DEQUEUE(lookup->my_server_list, srv, link);
                        ISC_LIST_APPEND(my_server_list, srv, link);
+                       i--;
                }
                ISC_LIST_APPENDLIST(lookup->my_server_list,
                                    my_server_list, link);
index 2d17961dc1371914f9ca23bf1bc7a1a04517ca9b..82eea056c0d1dcf501345ddf429a22e103668807 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: host.c,v 1.124.40.2 2011/02/28 01:19:58 tbox Exp $ */
+/* $Id: host.c,v 1.124.40.3 2011/03/11 06:46:59 marka Exp $ */
 
 /*! \file */
 
@@ -521,6 +521,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
                        printf("%scd", did_flag ? " " : "");
                        did_flag = ISC_TRUE;
+                       POST(did_flag);
                }
                printf("; QUERY: %u, ANSWER: %u, "
                       "AUTHORITY: %u, ADDITIONAL: %u\n",
index db3894fbb5c024465ff144de27746e503552dacf..83cf8ee797d8d7e20c71540c274cad6ab67e333e 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dnssec-keyfromlabel.c,v 1.32 2010/12/23 04:07:59 marka Exp $ */
+/* $Id: dnssec-keyfromlabel.c,v 1.32.14.1 2011/03/11 06:46:59 marka Exp $ */
 
 /*! \file */
 
@@ -518,6 +518,9 @@ main(int argc, char **argv) {
        {
                isc_buffer_clear(&buf);
                ret = dst_key_buildfilename(key, 0, directory, &buf);
+               if (ret != ISC_R_SUCCESS)
+                       fatal("dst_key_buildfilename returned: %s\n",
+                             isc_result_totext(ret));
                if (exact)
                        fatal("%s: %s already exists\n", program, filename);
 
@@ -542,6 +545,9 @@ main(int argc, char **argv) {
 
        isc_buffer_clear(&buf);
        ret = dst_key_buildfilename(key, 0, NULL, &buf);
+       if (ret != ISC_R_SUCCESS)
+               fatal("dst_key_buildfilename returned: %s\n",
+                     isc_result_totext(ret));
        printf("%s\n", filename);
        dst_key_free(&key);
 
index 9af739f7696abff8919eed9400a4e0fe0cb15ed6..7ea3ca373c236ab2be668875c75d11df5d7278c4 100644 (file)
@@ -29,7 +29,7 @@
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dnssec-keygen.c,v 1.115 2010/12/23 04:07:59 marka Exp $ */
+/* $Id: dnssec-keygen.c,v 1.115.14.1 2011/03/11 06:46:59 marka Exp $ */
 
 /*! \file */
 
@@ -975,12 +975,15 @@ main(int argc, char **argv) {
 
                        if (verbose > 0) {
                                isc_buffer_clear(&buf);
-                               dst_key_buildfilename(key, 0, directory, &buf);
-                               fprintf(stderr,
-                                       "%s: %s already exists, or might "
-                                       "collide with another key upon "
-                                       "revokation.  Generating a new key\n",
-                                       program, filename);
+                               ret = dst_key_buildfilename(key, 0,
+                                                           directory, &buf);
+                               if (ret == ISC_R_SUCCESS)
+                                       fprintf(stderr,
+                                               "%s: %s already exists, or "
+                                               "might collide with another "
+                                               "key upon revokation.  "
+                                               "Generating a new key\n",
+                                               program, filename);
                        }
 
                        dst_key_free(&key);
@@ -1001,6 +1004,9 @@ main(int argc, char **argv) {
 
        isc_buffer_clear(&buf);
        ret = dst_key_buildfilename(key, 0, NULL, &buf);
+       if (ret != ISC_R_SUCCESS)
+               fatal("dst_key_buildfilename returned: %s\n",
+                     isc_result_totext(ret));
        printf("%s\n", filename);
        dst_key_free(&key);
        if (prevkey != NULL)
index 74b26cd2e1e666105e059e4416982f0f51b38046..7e4a40304ccd8689eff950db01f6b1cd5bd7b091 100644 (file)
@@ -29,7 +29,7 @@
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dnssec-signzone.c,v 1.262.110.2 2011/02/28 01:19:58 tbox Exp $ */
+/* $Id: dnssec-signzone.c,v 1.262.110.3 2011/03/11 06:46:59 marka Exp $ */
 
 /*! \file */
 
@@ -1474,7 +1474,6 @@ verifyzone(void) {
        isc_boolean_t done = ISC_FALSE;
        isc_boolean_t first = ISC_TRUE;
        isc_boolean_t goodksk = ISC_FALSE;
-       isc_boolean_t goodzsk = ISC_FALSE;
        isc_result_t result;
        unsigned char revoked_ksk[256];
        unsigned char revoked_zsk[256];
@@ -1576,7 +1575,6 @@ verifyzone(void) {
 #endif
                        if (zsk_algorithms[dnskey.algorithm] != 255)
                                zsk_algorithms[dnskey.algorithm]++;
-                       goodzsk = ISC_TRUE;
                } else {
                        if (standby_zsk[dnskey.algorithm] != 255)
                                standby_zsk[dnskey.algorithm]++;
@@ -2199,6 +2197,7 @@ addnsec3param(const unsigned char *salt, size_t salt_length,
        result = dns_rdata_fromstruct(&rdata, gclass,
                                      dns_rdatatype_nsec3param,
                                      &nsec3param, &b);
+       check_result(result, "dns_rdata_fromstruct()");
        rdatalist.rdclass = rdata.rdclass;
        rdatalist.type = rdata.type;
        rdatalist.covers = 0;
@@ -2808,7 +2807,7 @@ loadzonekeys(isc_boolean_t preserve_keys, isc_boolean_t load_public) {
        }
        keyttl = rdataset.ttl;
 
-       /* Load keys corresponding to the existing DNSKEY RRset */
+       /* Load keys corresponding to the existing DNSKEY RRset. */
        result = dns_dnssec_keylistfromrdataset(gorigin, directory, mctx,
                                                &rdataset, &keysigs, &soasigs,
                                                preserve_keys, load_public,
index 766f013ba8d64fc2086078272eabf94f2faf3e50..ee0acd947f0fd92df8cd693bc932cc70f89d09e4 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: controlconf.c,v 1.60 2008/07/23 23:27:54 marka Exp $ */
+/* $Id: controlconf.c,v 1.60.544.1 2011/03/11 06:46:59 marka Exp $ */
 
 /*! \file */
 
@@ -859,7 +859,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
                cfg_obj_log(key, ns_g_lctx, ISC_LOG_WARNING,
                            "secret for key '%s' on command channel: %s",
                            keyid->keyname, isc_result_totext(result));
-               CHECK(result);
+               goto cleanup;
        }
 
        keyid->secret.length = isc_buffer_usedlength(&b);
index 7fa59d057b1b68c40fbba57ca1f6a2141e13223f..73ee24d6b774bd449bac2a9aafe1d8bc4d791830 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: interfacemgr.c,v 1.95 2009/01/17 23:47:42 tbox Exp $ */
+/* $Id: interfacemgr.c,v 1.95.426.1 2011/03/11 06:47:00 marka Exp $ */
 
 /*! \file */
 
@@ -379,7 +379,7 @@ ns_interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
                }
        }
        *ifpret = ifp;
-       return (ISC_R_SUCCESS);
+       return (result);
 
  cleanup_interface:
        ISC_LIST_UNLINK(ifp->mgr->interfaces, ifp, link);
@@ -964,7 +964,6 @@ isc_boolean_t
 ns_interfacemgr_listeningon(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr) {
        isc_sockaddr_t *old;
 
-       old = ISC_LIST_HEAD(mgr->listenon);
        for (old = ISC_LIST_HEAD(mgr->listenon);
             old != NULL;
             old = ISC_LIST_NEXT(old, link))
index 181f0859396d083d7a1ca53839e42426af2c03ad..25c62cf246b70fd50bcbfa7ed2c15ea726c68b35 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: main.c,v 1.180.14.2 2011/03/10 23:47:25 tbox Exp $ */
+/* $Id: main.c,v 1.180.14.3 2011/03/11 06:47:00 marka Exp $ */
 
 /*! \file */
 
@@ -562,6 +562,7 @@ parse_command_line(int argc, char *argv[]) {
 
        argc -= isc_commandline_index;
        argv += isc_commandline_index;
+       POST(argv);
 
        if (argc > 0) {
                usage();
index 63570ea8579168c318ec2a6ad2c6aca8a2846e99..20c96f24b3f47f75e4bf94023138c507a7179904 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.353.8.3 2011/03/10 04:29:15 each Exp $ */
+/* $Id: query.c,v 1.353.8.4 2011/03/11 06:47:00 marka Exp $ */
 
 /*! \file */
 
@@ -1622,6 +1622,7 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
        need_addname = ISC_FALSE;
        zone = NULL;
        needadditionalcache = ISC_FALSE;
+       POST(needadditionalcache);
        additionaltype = dns_rdatasetadditional_fromauth;
        dns_name_init(&cfname, NULL);
 
@@ -4283,11 +4284,12 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype,
                 * Check rules for the name if this it the first time,
                 * i.e. we've not been recursing.
                 */
-               result = DNS_R_SERVFAIL;
                st->state &= ~(DNS_RPZ_HAVE_IP | DNS_RPZ_HAVE_NSIPv4 |
                               DNS_RPZ_HAVE_NSIPv6 | DNS_RPZ_HAD_NSDNAME);
                result = rpz_rewrite_name(client, qtype, client->query.qname,
                                          DNS_RPZ_TYPE_QNAME, &rdataset);
+               if (result != ISC_R_SUCCESS)
+                       goto cleanup;
                if (st->m.policy != DNS_RPZ_POLICY_MISS)
                        goto cleanup;
                if ((st->state & (DNS_RPZ_HAVE_NSIPv4 | DNS_RPZ_HAVE_NSIPv6 |
@@ -4393,9 +4395,10 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype,
                            (st->state & DNS_RPZ_HAVE_NSIPv6) != 0 &&
                            st->m.type != DNS_RPZ_TYPE_NSDNAME) {
                                result = rpz_rewrite_nsip(client,
-                                                       dns_rdatatype_aaaa,
-                                                       &ns.name, &ipdb, version,
-                                                       &rdataset, resuming);
+                                                         dns_rdatatype_aaaa,
+                                                         &ns.name, &ipdb,
+                                                         version, &rdataset,
+                                                         resuming);
                        }
                        dns_rdata_freestruct(&ns);
                        if (ipdb != NULL)
@@ -4910,12 +4913,14 @@ dns64_aaaaok(ns_client_t *client, dns_rdataset_t *rdataset,
                                break;
                        }
                }
-               if (i == count)
+               if (i == count && aaaaok != NULL)
                        isc_mem_put(client->mctx, aaaaok,
                                    sizeof(isc_boolean_t) * count);
                return (ISC_TRUE);
        }
-       isc_mem_put(client->mctx, aaaaok, sizeof(isc_boolean_t) * count);
+       if (aaaaok != NULL)
+               isc_mem_put(client->mctx, aaaaok,
+                           sizeof(isc_boolean_t) * count);
        return (ISC_FALSE);
 }
 
@@ -5264,7 +5269,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        dns_name_copy(fname, rpz_st->fname, NULL);
                        rpz_st->q.result = result;
                        client->query.attributes |= NS_QUERYATTR_RECURSING;
-                       result = ISC_R_SUCCESS;
                        goto cleanup;
                default:
                        RECURSE_ERROR(rresult);
@@ -5716,8 +5720,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        goto db_find;
                }
 
-               result = DNS_R_NXRRSET;
-
                /*
                 * Look for a NSEC3 record if we don't have a NSEC record.
                 */
@@ -6613,9 +6615,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                        /*
                                         * Add a fake SOA record.
                                         */
-                                       result = query_addsoa(client, db,
-                                                             version, 600,
-                                                             ISC_FALSE);
+                                       (void)query_addsoa(client, db, version,
+                                                          600, ISC_FALSE);
                                        goto cleanup;
                                }
 #endif
index 368d47d9e3faee8b836f14a26b73951d0e39727c..935bebce1409ea78b1f6334c642e0d458d126824 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: server.c,v 1.599.8.7 2011/03/10 04:29:15 each Exp $ */
+/* $Id: server.c,v 1.599.8.8 2011/03/11 06:47:00 marka Exp $ */
 
 /*! \file */
 
@@ -845,18 +845,13 @@ get_view_querysource_dispatch(const cfg_obj_t **maps,
                              int af, dns_dispatch_t **dispatchp,
                              isc_boolean_t is_firstview)
 {
-       isc_result_t result;
+       isc_result_t result = ISC_R_FAILURE;
        dns_dispatch_t *disp;
        isc_sockaddr_t sa;
        unsigned int attrs, attrmask;
        const cfg_obj_t *obj = NULL;
        unsigned int maxdispatchbuffers;
 
-       /*
-        * Make compiler happy.
-        */
-       result = ISC_R_FAILURE;
-
        switch (af) {
        case AF_INET:
                result = ns_config_get(maps, "query-source", &obj);
@@ -1643,6 +1638,7 @@ configure_view(dns_view_t *view, cfg_parser_t* parser,
                sep = "";
                viewname = "";
                forview = "";
+               POST(forview);
        }
 
        /*
@@ -3184,6 +3180,7 @@ create_view(const cfg_obj_t *vconfig, dns_viewlist_t *viewlist,
                classobj = cfg_tuple_get(vconfig, "class");
                result = ns_config_getclass(classobj, dns_rdataclass_in,
                                            &viewclass);
+               INSIST(result == ISC_R_SUCCESS);
        } else {
                viewname = "_default";
                viewclass = dns_rdataclass_in;
@@ -4250,7 +4247,7 @@ load_configuration(const char *filename, ns_server_t *server,
        if (result == ISC_R_SUCCESS)
                maps[i++] = options;
        maps[i++] = ns_g_defaults;
-       maps[i++] = NULL;
+       maps[i] = NULL;
 
        /*
         * If bind.keys exists, load it.  If "dnssec-lookaside auto"
@@ -4476,11 +4473,10 @@ load_configuration(const char *filename, ns_server_t *server,
                if (options != NULL)
                        (void)cfg_map_get(options, "listen-on", &clistenon);
                if (clistenon != NULL) {
-                       result = ns_listenlist_fromconfig(clistenon,
-                                                         config,
-                                                         &aclconfctx,
-                                                         ns_g_mctx,
-                                                         &listenon);
+                       /* check return code? */
+                       (void)ns_listenlist_fromconfig(clistenon, config,
+                                                      &aclconfctx, ns_g_mctx,
+                                                      &listenon);
                } else if (!ns_g_lwresdonly) {
                        /*
                         * Not specified, use default.
@@ -4504,11 +4500,10 @@ load_configuration(const char *filename, ns_server_t *server,
                if (options != NULL)
                        (void)cfg_map_get(options, "listen-on-v6", &clistenon);
                if (clistenon != NULL) {
-                       result = ns_listenlist_fromconfig(clistenon,
-                                                         config,
-                                                         &aclconfctx,
-                                                         ns_g_mctx,
-                                                         &listenon);
+                       /* check return code? */
+                       (void)ns_listenlist_fromconfig(clistenon, config,
+                                                      &aclconfctx, ns_g_mctx,
+                                                      &listenon);
                } else if (!ns_g_lwresdonly) {
                        isc_boolean_t enable;
                        /*
@@ -5200,8 +5195,8 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
 void
 ns_server_create(isc_mem_t *mctx, ns_server_t **serverp) {
        isc_result_t result;
-
        ns_server_t *server = isc_mem_get(mctx, sizeof(*server));
+
        if (server == NULL)
                fatal("allocating server object", ISC_R_NOMEMORY);
 
@@ -5947,7 +5942,6 @@ ns_server_dumpstats(ns_server_t *server) {
                "could not open statistics dump file", server->statsfile);
 
        result = ns_stats_dump(server, fp);
-       CHECK(result);
 
  cleanup:
        if (fp != NULL)
@@ -6135,6 +6129,7 @@ dumpdone(void *arg, isc_result_t result) {
                                fprintf(dctx->fp, "; %s\n",
                                        dns_result_totext(result));
                                result = ISC_R_SUCCESS;
+                               POST(result);
                                goto nextzone;
                        }
                        if (result != ISC_R_SUCCESS)
index 197efbc8d8a74c0fe065c7615ad951400b590987..0b3d17f7c0b61ade94e50a90f52b5952182c7b85 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: statschannel.c,v 1.26 2010/02/04 23:49:13 tbox Exp $ */
+/* $Id: statschannel.c,v 1.26.150.1 2011/03/11 06:47:00 marka Exp $ */
 
 /*! \file */
 
@@ -638,7 +638,7 @@ rdatasetstats_dump(dns_rdatastatstype_t type, isc_uint64_t val, void *arg) {
 
 static void
 opcodestat_dump(dns_opcode_t code, isc_uint64_t val, void *arg) {
-       FILE *fp = arg;
+       FILE *fp;
        isc_buffer_t b;
        char codebuf[64];
        stats_dumparg_t *dumparg = arg;
index 1ef2010e048f6b8e298dd5e119f5b3a8e2b84645..eda312e1fff24bd2591cef7ceed14faf8f7514a8 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: update.c,v 1.186.16.2 2011/02/28 01:19:59 tbox Exp $ */
+/* $Id: update.c,v 1.186.16.3 2011/03/11 06:47:01 marka Exp $ */
 
 #include <config.h>
 
@@ -3734,7 +3734,6 @@ update_action(isc_task_t *task, isc_event_t *event) {
         * Check Requestor's Permissions.  It seems a bit silly to do this
         * only after prerequisite testing, but that is what RFC2136 says.
         */
-       result = ISC_R_SUCCESS;
        if (ssutable == NULL)
                CHECK(checkupdateacl(client, dns_zone_getupdateacl(zone),
                                     "update", zonename, ISC_FALSE, ISC_FALSE));
index 3d93f5b97c7837e2b856ccc83acd88e4db499606..61374b8ab407eed3cdbab1f80f5bd7d9b5851ec8 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zoneconf.c,v 1.170.14.2 2011/03/11 00:47:27 marka Exp $ */
+/* $Id: zoneconf.c,v 1.170.14.3 2011/03/11 06:47:01 marka Exp $ */
 
 /*% */
 
@@ -127,7 +127,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
        /* First check to see if ACL is defined within the zone */
        if (zconfig != NULL) {
                maps[0] = cfg_tuple_get(zconfig, "options");
-               ns_config_get(maps, aclname, &aclobj);
+               (void)ns_config_get(maps, aclname, &aclobj);
                if (aclobj != NULL) {
                        aclp = NULL;
                        goto parse_acl;
@@ -155,7 +155,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
        maps[i++] = ns_g_defaults;
        maps[i] = NULL;
 
-       result = ns_config_get(maps, aclname, &aclobj);
+       (void)ns_config_get(maps, aclname, &aclobj);
        if (aclobj == NULL) {
                (*clearzacl)(zone);
                return (ISC_R_SUCCESS);
@@ -605,7 +605,8 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
        /* Prepare zone RRs from the configuration */
        obj = NULL;
        result = cfg_map_get(zconfig, "server-addresses", &obj);
-       if (obj != NULL) {
+       if (result == ISC_R_SUCCESS) {
+               INSIST(obj != NULL);
                result = configure_staticstub_serveraddrs(obj, zone,
                                                          &rdatalist_ns,
                                                          &rdatalist_a,
@@ -616,7 +617,8 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
 
        obj = NULL;
        result = cfg_map_get(zconfig, "server-names", &obj);
-       if (obj != NULL) {
+       if (result == ISC_R_SUCCESS) {
+               INSIST(obj != NULL);
                result = configure_staticstub_servernames(obj, zone,
                                                          &rdatalist_ns,
                                                          zname);
@@ -714,7 +716,7 @@ zonetype_fromconfig(const cfg_obj_t *map) {
        isc_result_t result;
 
        result = cfg_map_get(map, "type", &obj);
-       INSIST(result == ISC_R_SUCCESS);
+       INSIST(result == ISC_R_SUCCESS && obj != NULL);
        return (ns_config_getzonetype(obj));
 }
 
@@ -778,7 +780,7 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
                INSIST(0);
        }
        result = ns_checknames_get(maps, zone, objp);
-       INSIST(result == ISC_R_SUCCESS);
+       INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL);
 }
 
 isc_result_t
@@ -832,7 +834,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                        maps[i++] = options;
        }
        maps[i++] = ns_g_defaults;
-       maps[i++] = NULL;
+       maps[i] = NULL;
 
        if (vconfig != NULL)
                RETERR(ns_config_getclass(cfg_tuple_get(vconfig, "class"),
@@ -934,7 +936,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
        obj = NULL;
        result = ns_config_get(maps, "dialup", &obj);
-       INSIST(result == ISC_R_SUCCESS);
+       INSIST(result == ISC_R_SUCCESS && obj != NULL);
        if (cfg_obj_isboolean(obj)) {
                if (cfg_obj_asboolean(obj))
                        dialup = dns_dialuptype_yes;
@@ -957,7 +959,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
        obj = NULL;
        result = ns_config_get(maps, "zone-statistics", &obj);
-       INSIST(result == ISC_R_SUCCESS);
+       INSIST(result == ISC_R_SUCCESS && obj != NULL);
        zonestats_on = cfg_obj_asboolean(obj);
        zoneqrystats = NULL;
        if (zonestats_on) {
@@ -976,7 +978,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
        if (ztype != dns_zone_stub && ztype != dns_zone_staticstub) {
                obj = NULL;
                result = ns_config_get(maps, "notify", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (cfg_obj_isboolean(obj)) {
                        if (cfg_obj_asboolean(obj))
                                notifytype = dns_notifytype_yes;
@@ -1012,19 +1014,19 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "notify-source", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                RETERR(dns_zone_setnotifysrc4(zone, cfg_obj_assockaddr(obj)));
                ns_add_reserved_dispatch(ns_g_server, cfg_obj_assockaddr(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "notify-source-v6", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                RETERR(dns_zone_setnotifysrc6(zone, cfg_obj_assockaddr(obj)));
                ns_add_reserved_dispatch(ns_g_server, cfg_obj_assockaddr(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "notify-to-soa", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setoption(zone, DNS_ZONEOPT_NOTIFYTOSOA,
                                   cfg_obj_asboolean(obj));
 
@@ -1037,17 +1039,17 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "max-transfer-time-out", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setmaxxfrout(zone, cfg_obj_asuint32(obj) * 60);
 
                obj = NULL;
                result = ns_config_get(maps, "max-transfer-idle-out", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setidleout(zone, cfg_obj_asuint32(obj) * 60);
 
                obj = NULL;
                result =  ns_config_get(maps, "max-journal-size", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setjournalsize(zone, -1);
                if (cfg_obj_isstring(obj)) {
                        const char *str = cfg_obj_asstring(obj);
@@ -1071,7 +1073,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "ixfr-from-differences", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (cfg_obj_isboolean(obj))
                        ixfrdiff = cfg_obj_asboolean(obj);
                else if (!strcasecmp(cfg_obj_asstring(obj), "master") &&
@@ -1100,23 +1102,23 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "notify-delay", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setnotifydelay(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "check-sibling", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSIBLING,
                                   cfg_obj_asboolean(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "zero-no-soa-ttl", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setzeronosoattl(zone, cfg_obj_asboolean(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "nsec3-test-zone", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setoption(zone, DNS_ZONEOPT_NSEC3TESTZONE,
                                   cfg_obj_asboolean(obj));
        }
@@ -1145,7 +1147,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "sig-validity-interval", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                {
                        const cfg_obj_t *validity, *resign;
 
@@ -1176,28 +1178,28 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "sig-signing-signatures", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setsignatures(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "sig-signing-nodes", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setnodes(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "sig-signing-type", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setprivatetype(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "update-check-ksk", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setoption(zone, DNS_ZONEOPT_UPDATECHECKKSK,
                                   cfg_obj_asboolean(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "dnssec-dnskey-kskonly", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setoption(zone, DNS_ZONEOPT_DNSKEYKSKONLY,
                                   cfg_obj_asboolean(obj));
        } else if (ztype == dns_zone_slave) {
@@ -1224,7 +1226,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "check-dup-records", &obj);
-               INSIST(obj != NULL);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
                        fail = ISC_FALSE;
                        check = ISC_TRUE;
@@ -1239,7 +1241,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "check-mx", &obj);
-               INSIST(obj != NULL);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
                        fail = ISC_FALSE;
                        check = ISC_TRUE;
@@ -1254,13 +1256,13 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "check-integrity", &obj);
-               INSIST(obj != NULL);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setoption(zone, DNS_ZONEOPT_CHECKINTEGRITY,
                                   cfg_obj_asboolean(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "check-mx-cname", &obj);
-               INSIST(obj != NULL);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
                        warn = ISC_TRUE;
                        ignore = ISC_FALSE;
@@ -1275,7 +1277,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "check-srv-cname", &obj);
-               INSIST(obj != NULL);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
                        warn = ISC_TRUE;
                        ignore = ISC_FALSE;
@@ -1290,7 +1292,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                obj = NULL;
                result = ns_config_get(maps, "dnssec-secure-to-insecure", &obj);
-               INSIST(obj != NULL);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setoption(zone, DNS_ZONEOPT_SECURETOINSECURE,
                                   cfg_obj_asboolean(obj));
 
@@ -1322,7 +1324,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
        case dns_zone_stub:
                count = 0;
                obj = NULL;
-               result = cfg_map_get(zoptions, "masters", &obj);
+               (void)cfg_map_get(zoptions, "masters", &obj);
                if (obj != NULL) {
                        addrs = NULL;
                        keynames = NULL;
@@ -1341,61 +1343,61 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                if (count > 1) {
                        obj = NULL;
                        result = ns_config_get(maps, "multi-master", &obj);
-                       INSIST(result == ISC_R_SUCCESS);
+                       INSIST(result == ISC_R_SUCCESS && obj != NULL);
                        multi = cfg_obj_asboolean(obj);
                }
                dns_zone_setoption(zone, DNS_ZONEOPT_MULTIMASTER, multi);
 
                obj = NULL;
                result = ns_config_get(maps, "max-transfer-time-in", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setmaxxfrin(zone, cfg_obj_asuint32(obj) * 60);
 
                obj = NULL;
                result = ns_config_get(maps, "max-transfer-idle-in", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setidlein(zone, cfg_obj_asuint32(obj) * 60);
 
                obj = NULL;
                result = ns_config_get(maps, "max-refresh-time", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setmaxrefreshtime(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "min-refresh-time", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setminrefreshtime(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "max-retry-time", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setmaxretrytime(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "min-retry-time", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setminretrytime(zone, cfg_obj_asuint32(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "transfer-source", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                RETERR(dns_zone_setxfrsource4(zone, cfg_obj_assockaddr(obj)));
                ns_add_reserved_dispatch(ns_g_server, cfg_obj_assockaddr(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "transfer-source-v6", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                RETERR(dns_zone_setxfrsource6(zone, cfg_obj_assockaddr(obj)));
                ns_add_reserved_dispatch(ns_g_server, cfg_obj_assockaddr(obj));
 
                obj = NULL;
                result = ns_config_get(maps, "alt-transfer-source", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                RETERR(dns_zone_setaltxfrsource4(zone, cfg_obj_assockaddr(obj)));
 
                obj = NULL;
                result = ns_config_get(maps, "alt-transfer-source-v6", &obj);
-               INSIST(result == ISC_R_SUCCESS);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
                RETERR(dns_zone_setaltxfrsource6(zone, cfg_obj_assockaddr(obj)));
 
                obj = NULL;
index f949a371868b160f253d886b41b9fe89e67d8f47..4fa295f33724b191646246378226e7a10c0c394e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsupdate.c,v 1.193 2011/01/10 05:32:03 marka Exp $ */
+/* $Id: nsupdate.c,v 1.193.12.1 2011/03/11 06:47:01 marka Exp $ */
 
 /*! \file */
 
@@ -2260,6 +2260,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
        }
        check_result(result, "dns_request_getresponse");
        section = DNS_SECTION_ANSWER;
+       POST(section);
        if (debugging)
                show_message(stderr, rcvmsg, "Reply from SOA query:");
 
index 3a7a2a725a058828aa74bf5d997bf7fc8c15ca92..37bb71159c1ba84064ea63ee9b2dc54c14dbd57b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_db.c,v 1.39 2009/09/01 00:22:25 jinmei Exp $ */
+/* $Id: t_db.c,v 1.39.346.1 2011/03/11 06:47:01 marka Exp $ */
 
 #include <config.h>
 
@@ -118,7 +118,6 @@ t_dns_db_load(char **av) {
        isc_result_t            exp_load_result;
        isc_result_t            exp_find_result;
 
-       result = T_UNRESOLVED;
        db = NULL;
        mctx = NULL;
        ectx = NULL;
@@ -292,8 +291,6 @@ t_dns_db_zc_x(char *filename, char *db_type, char *origin, char *class,
        isc_buffer_t            origin_buffer;
        dns_fixedname_t         dns_origin;
 
-       result = T_UNRESOLVED;
-
        db = NULL;
        mctx = NULL;
        ectx = NULL;
@@ -769,8 +766,6 @@ t_dns_db_currentversion(char **av) {
        dns_dbversion_t         *cversionp;
        dns_dbversion_t         *nversionp;
 
-       result = T_UNRESOLVED;
-
        filename = T_ARG(0);
        db_type = T_ARG(1);
        origin = T_ARG(2);
@@ -1050,8 +1045,6 @@ t_dns_db_newversion(char **av) {
        dns_dbversion_t         *nversionp;
        dns_rdatalist_t         rdatalist;
 
-       result = T_UNRESOLVED;
-
        filename = T_ARG(0);
        db_type = T_ARG(1);
        origin = T_ARG(2);
@@ -1384,7 +1377,6 @@ t_dns_db_closeversion_1(char **av) {
        existing_type = T_ARG(8);
 
        nfails = 0;
-       result = T_UNRESOLVED;
        db = NULL;
        mctx = NULL;
        ectx = NULL;
@@ -1796,7 +1788,6 @@ t_dns_db_closeversion_2(char **av) {
        existing_type = T_ARG(8);
 
        nfails = 0;
-       result = T_UNRESOLVED;
        db = NULL;
        mctx = NULL;
        ectx = NULL;
@@ -2259,8 +2250,6 @@ t_dns_db_expirenode(char **av) {
        mctx = NULL;
        ectx = NULL;
 
-       result = T_UNRESOLVED;
-
        /*
         * Find a node, mark it as stale, do a dns_db_find on the name and
         * expect it to fail.
@@ -2464,7 +2453,6 @@ t_dns_db_findnode_1(char **av) {
        db = NULL;
        mctx = NULL;
        ectx = NULL;
-       result = T_UNRESOLVED;
 
        t_info("testing using file %s and name %s\n", filename, find_name);
 
@@ -2526,6 +2514,13 @@ t_dns_db_findnode_1(char **av) {
        isc_buffer_add(&name_buffer, len);
        dns_result = dns_name_fromtext(dns_fixedname_name(&dns_name),
                                &name_buffer, NULL, 0, NULL);
+       if (dns_result != ISC_R_SUCCESS) {
+               t_info("dns_name_fromtext failed %s\n",
+                              dns_result_totext(dns_result));
+               dns_db_detach(&db);
+               isc_mem_destroy(&mctx);
+               return(T_UNRESOLVED);
+       }
 
        dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_name),
                                ISC_FALSE, &nodep);
@@ -2623,7 +2618,6 @@ t_dns_db_findnode_2(char **av) {
        model = T_ARG(4);
        newname = T_ARG(5);
 
-       result = T_UNRESOLVED;
        db = NULL;
        mctx = NULL;
        ectx = NULL;
@@ -2682,6 +2676,15 @@ t_dns_db_findnode_2(char **av) {
        isc_buffer_add(&name_buffer, len);
        dns_result = dns_name_fromtext(dns_fixedname_name(&dns_name),
                                       &name_buffer, NULL, 0, NULL);
+       if (dns_result != ISC_R_SUCCESS) {
+               t_info("dns_name_fromtext returned %s\n",
+                               dns_result_totext(dns_result));
+               dns_db_detach(&db);
+               isc_hash_destroy();
+               isc_entropy_detach(&ectx);
+               isc_mem_destroy(&mctx);
+               return(T_UNRESOLVED);
+       }
 
        dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_name),
                                     ISC_FALSE, &nodep);
@@ -2816,8 +2819,6 @@ t_dns_db_find_x(char **av) {
        dns_rdatatype_t         rdatatype;
        dns_dbversion_t         *cversionp;
 
-       result = T_UNRESOLVED;
-
        dbfile = T_ARG(0);
        dbtype = T_ARG(1);
        dborigin = T_ARG(2);
index 496b79aa375f4bb89774d9c25aabb9a21cb88d66..f3bad51486e24245e393b0432ee78ebac417e5e9 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_master.c,v 1.39 2009/09/01 00:22:25 jinmei Exp $ */
+/* $Id: t_master.c,v 1.39.346.1 2011/03/11 06:47:01 marka Exp $ */
 
 #include <config.h>
 
@@ -77,7 +77,6 @@ test_master(char *testfile, char *origin, char *class, isc_result_t exp_result)
        dns_rdataclass_t        rdataclass;
        isc_textregion_t        textregion;
 
-       result = T_UNRESOLVED;
        if (T1_mctx == NULL)
                isc_result = isc_mem_create(0, 0, &T1_mctx);
        else
index d3a8b66c7dcec3d707157ff8e1336fd6ae9a42b3..28f42ef40c3e5de6ed29472e05b2c32067e13b7f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_names.c,v 1.50 2009/09/01 23:47:44 tbox Exp $ */
+/* $Id: t_names.c,v 1.50.346.1 2011/03/11 06:47:01 marka Exp $ */
 
 #include <config.h>
 
@@ -179,7 +179,6 @@ getmsg(char *datafile_name, unsigned char *buf, int buflen, isc_buffer_t *pbuf)
        int                     c;
        int                     len;
        int                     cnt;
-       unsigned int            val;
        unsigned char           *p;
        FILE                    *fp;
 
@@ -192,8 +191,8 @@ getmsg(char *datafile_name, unsigned char *buf, int buflen, isc_buffer_t *pbuf)
        p = buf;
        cnt = 0;
        len = 0;
-       val = 0;
        while ((c = getc(fp)) != EOF) {
+               unsigned int            val;
                if (    (c == ' ') || (c == '\t') ||
                        (c == '\r') || (c == '\n'))
                                continue;
@@ -1678,8 +1677,6 @@ test_dns_name_fromtext(char *test_name1, char *test_name2, char *test_origin,
        isc_result_t    dns_result;
        dns_namereln_t  dns_namereln;
 
-       result = T_UNRESOLVED;
-
        t_info("testing %s %s %s\n", test_name1, test_name2, test_origin);
 
        isc_buffer_init(&binbuf1, junk1, BUFLEN);
@@ -1815,8 +1812,6 @@ test_dns_name_totext(char *test_name, isc_boolean_t omit_final) {
        isc_result_t    dns_result;
        dns_namereln_t  dns_namereln;
 
-       result = T_UNRESOLVED;
-
        t_info("testing %s\n", test_name);
 
        len = strlen(test_name);
@@ -1983,8 +1978,6 @@ test_dns_name_fromwire(char *datafile_name, int testname_offset, int downcase,
        dns_namereln_t          dns_namereln;
        dns_decompress_t        dctx;
 
-       result = T_UNRESOLVED;
-
        t_info("testing using %s\n", datafile_name);
        len = getmsg(datafile_name, buf1, BIGBUFLEN, &iscbuf1);
 
index 55ebfd2b771eb7163e877359672337a3dac5311a..294ae9a0b921b30765094142279fc32b803634dd 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_rbt.c,v 1.33 2009/09/01 00:22:25 jinmei Exp $ */
+/* $Id: t_rbt.c,v 1.33.346.1 2011/03/11 06:47:02 marka Exp $ */
 
 #include <config.h>
 
@@ -398,8 +398,7 @@ test_rbt_gen(char *filename, char *command, char *testname,
                                result = T_FAIL;
                        }
                } else {
-                       t_info("create_name failed %s\n",
-                               dns_result_totext(dns_result));
+                       t_info("create_name failed\n");
                        result = T_UNRESOLVED;
                }
        } else if ((strcmp(command, "delete") == 0) ||
@@ -1112,8 +1111,8 @@ t_dns_rbtnodechain_first(char *dbfile, char *expected_firstname,
                t_info("dns_rbtnodechain_first unexpectedly returned %s\n",
                       dns_result_totext(dns_result));
 
-       nfails = t_namechk(dns_result, &dns_name, expected_firstname,
-                          &dns_origin, expected_firstorigin, DNS_R_NEWORIGIN);
+       nfails += t_namechk(dns_result, &dns_name, expected_firstname,
+                           &dns_origin, expected_firstorigin, DNS_R_NEWORIGIN);
 
        dns_fixedname_init(&dns_name);
        dns_result = dns_rbtnodechain_next(&chain,
@@ -1303,8 +1302,8 @@ t_dns_rbtnodechain_last(char *dbfile, char *expected_lastname,
                t_info("dns_rbtnodechain_last unexpectedly returned %s\n",
                       dns_result_totext(dns_result));
        }
-       nfails = t_namechk(dns_result, &dns_name, expected_lastname,
-                          &dns_origin, expected_lastorigin, DNS_R_NEWORIGIN);
+       nfails += t_namechk(dns_result, &dns_name, expected_lastname,
+                           &dns_origin, expected_lastorigin, DNS_R_NEWORIGIN);
 
        t_info("testing for previous name of %s, origin of %s\n",
               expected_prevname, expected_prevorigin);
index 2eac54b9956829264153557c45cdbb4f69d9d6ad..283f741f7bf15c329431f5aa9e19c2a5ae37e0a3 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_tasks.c,v 1.42 2009/01/22 23:47:54 tbox Exp $ */
+/* $Id: t_tasks.c,v 1.42.424.1 2011/03/11 06:47:02 marka Exp $ */
 
 #include <config.h>
 
@@ -897,7 +897,6 @@ t_tasks4(void) {
        T4_nfails = 0;
        T4_flag = 0;
 
-       result = T_UNRESOLVED;
        event_type = 4;
 
        workers = 2;
@@ -1097,7 +1096,6 @@ t_tasks7(void) {
        T7_sdflag = 0;
        T7_eflag = 0;
 
-       result = T_UNRESOLVED;
        event_type = 7;
 
        workers = 2;
index 12e1b76e60930c1aba24750d60b160b6056a2936..48e22348493b3c57c9348fa0ab4760f7ec4ff6a4 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_timers.c,v 1.30 2009/01/22 23:47:54 tbox Exp $ */
+/* $Id: t_timers.c,v 1.30.424.1 2011/03/11 06:47:02 marka Exp $ */
 
 #include <config.h>
 
@@ -63,8 +63,8 @@ static void
 tx_sde(isc_task_t *task, isc_event_t *event) {
        isc_result_t    isc_result;
 
-       task = task;
-       event = event;
+       UNUSED(task);
+       UNUSED(event);
 
        /*
         * Signal shutdown processing complete.
@@ -776,7 +776,7 @@ t5_tick_event(isc_task_t *task, isc_event_t *event) {
        isc_time_t      expires;
        isc_interval_t  interval;
 
-       task = task;
+       UNUSED(task);
 
        ++T5_eventcnt;
        t_info("t5_tick_event %d\n", T5_eventcnt);
index 7e7de7ef107183a1e3a21a6fee1aa693d2aab847..c0386a7f3be0fbd69e34920b0929a6b922cd4a49 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check.c,v 1.125 2011/01/07 23:47:07 tbox Exp $ */
+/* $Id: check.c,v 1.125.14.1 2011/03/11 06:47:02 marka Exp $ */
 
 /*! \file */
 
@@ -1999,7 +1999,7 @@ check_trusted_key(const cfg_obj_t *key, isc_boolean_t managed,
        const char *keystr, *keynamestr;
        dns_fixedname_t fkeyname;
        dns_name_t *keyname;
-       isc_buffer_t keydatabuf;
+       isc_buffer_t b;
        isc_region_t r;
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
@@ -2012,6 +2012,15 @@ check_trusted_key(const cfg_obj_t *key, isc_boolean_t managed,
        keyname = dns_fixedname_name(&fkeyname);
        keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
 
+       isc_buffer_init(&b, keynamestr, strlen(keynamestr));
+       isc_buffer_add(&b, strlen(keynamestr));
+       result = dns_name_fromtext(keyname, &b, dns_rootname, 0, NULL);
+       if (result != ISC_R_SUCCESS) {
+               cfg_obj_log(key, logctx, ISC_LOG_WARNING, "bad key name: %s\n",
+                           isc_result_totext(result));
+               result = ISC_R_FAILURE;
+       }
+
        if (flags > 0xffff) {
                cfg_obj_log(key, logctx, ISC_LOG_WARNING,
                            "flags too big: %u\n", flags);
@@ -2041,17 +2050,17 @@ check_trusted_key(const cfg_obj_t *key, isc_boolean_t managed,
                }
        }
 
-       isc_buffer_init(&keydatabuf, keydata, sizeof(keydata));
+       isc_buffer_init(&b, keydata, sizeof(keydata));
 
        keystr = cfg_obj_asstring(cfg_tuple_get(key, "key"));
-       tresult = isc_base64_decodestring(keystr, &keydatabuf);
+       tresult = isc_base64_decodestring(keystr, &b);
 
        if (tresult != ISC_R_SUCCESS) {
                cfg_obj_log(key, logctx, ISC_LOG_ERROR,
                            "%s", isc_result_totext(tresult));
                result = ISC_R_FAILURE;
        } else {
-               isc_buffer_usedregion(&keydatabuf, &r);
+               isc_buffer_usedregion(&b, &r);
 
                if ((alg == DST_ALG_RSASHA1 || alg == DST_ALG_RSAMD5) &&
                    r.length > 1 && r.base[0] == 1 && r.base[1] == 3)
index 41292eb2fe072d8ec7fe9371e58844fe6a2bb634..d1843b616fa9f39af2ed2305d801f8183e9ac951 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: adb.c,v 1.254.14.2 2011/02/28 01:20:01 tbox Exp $ */
+/* $Id: adb.c,v 1.254.14.3 2011/03/11 06:47:02 marka Exp $ */
 
 /*! \file
  *
@@ -2195,7 +2195,6 @@ check_expire_name(dns_adbname_t **namep, isc_stdtime_t now) {
 static void
 check_stale_name(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
        int victims, max_victims;
-       isc_boolean_t result;
        dns_adbname_t *victim, *next_victim;
        isc_boolean_t overmem = isc_mem_isovermem(adb->mctx);
        int scans = 0;
@@ -2217,7 +2216,7 @@ check_stale_name(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
                INSIST(!NAME_DEAD(victim));
                scans++;
                next_victim = ISC_LIST_PREV(victim, plink);
-               result = check_expire_name(&victim, now);
+               (void)check_expire_name(&victim, now);
                if (victim == NULL) {
                        victims++;
                        goto next;
@@ -2762,6 +2761,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
        REQUIRE((options & DNS_ADBFIND_ADDRESSMASK) != 0);
 
        result = ISC_R_UNEXPECTED;
+       POST(result);
        wanted_addresses = (options & DNS_ADBFIND_ADDRESSMASK);
        wanted_fetches = 0;
        query_pending = 0;
@@ -3168,6 +3168,7 @@ dns_adb_cancelfind(dns_adbfind_t *find) {
        }
        UNLOCK(&adb->namelocks[unlock_bucket]);
        bucket = DNS_ADB_INVALIDBUCKET;
+       POST(bucket);
 
  cleanup:
 
index 644b7ee2633a7b10f1efd2c0f929fd74cd15f6b3..a42a99fe51362892db17de7b38c0db410a3179d1 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: client.c,v 1.12 2010/12/03 12:03:22 marka Exp $ */
+/* $Id: client.c,v 1.12.24.1 2011/03/11 06:47:03 marka Exp $ */
 
 #include <config.h>
 
@@ -721,7 +721,7 @@ view_find(resctx_t *rctx, dns_db_t **dbp, dns_dbnode_t **nodep,
 static void
 client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
        isc_mem_t *mctx;
-       isc_result_t result, tresult;
+       isc_result_t tresult, result = ISC_R_SUCCESS;
        isc_result_t vresult = ISC_R_SUCCESS;
        isc_boolean_t want_restart;
        isc_boolean_t send_event = ISC_FALSE;
@@ -741,7 +741,6 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
 
        mctx = rctx->view->mctx;
 
-       result = ISC_R_SUCCESS;
        name = dns_fixedname_name(&rctx->name);
 
        do {
@@ -782,6 +781,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                                goto done;
                        }
                } else {
+                       INSIST(event != NULL);
                        INSIST(event->fetch == rctx->fetch);
                        dns_resolver_destroyfetch(&rctx->fetch);
                        db = event->db;
@@ -965,6 +965,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                                                              &rctx->rdataset);
                                        if (tresult != ISC_R_SUCCESS) {
                                                result = tresult;
+                                               POST(result);
                                                break;
                                        }
                                }
@@ -976,6 +977,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                                 * implementation).
                                 */
                                result = DNS_R_SERVFAIL; /* better code? */
+                               POST(result);
                        } else {
                                ISC_LIST_APPEND(rctx->namelist, ansname, link);
                                ansname = NULL;
@@ -2131,6 +2133,7 @@ receive_soa(isc_task_t *task, isc_event_t *event) {
        reqev = (dns_requestevent_t *)event;
        request = reqev->request;
        result = eresult = reqev->result;
+       POST(result);
        uctx = reqev->ev_arg;
        client = uctx->client;
        soaquery = uctx->soaquery;
@@ -2177,6 +2180,7 @@ receive_soa(isc_task_t *task, isc_event_t *event) {
        }
 
        section = DNS_SECTION_ANSWER;
+       POST(section);
 
        if (rcvmsg->rcode != dns_rcode_noerror &&
            rcvmsg->rcode != dns_rcode_nxdomain) {
index 32f9a69bb8c1f849cd5d7224b0a1db90ea5b4e50..e9c512e3db39e27c2a0c943351c79a676b9f7c10 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: diff.c,v 1.23 2009/12/01 00:47:09 each Exp $ */
+/* $Id: diff.c,v 1.23.248.1 2011/03/11 06:47:03 marka Exp $ */
 
 /*! \file */
 
@@ -264,7 +264,6 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
                        dns_rdataset_t rds;
                        dns_rdataset_t ardataset;
                        dns_rdataset_t *modified = NULL;
-                       isc_boolean_t offline;
 
                        op = t->op;
                        type = t->rdata.type;
@@ -301,7 +300,6 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
                                CHECK(dns_db_findnsec3node(db, name, ISC_TRUE,
                                                           &node));
 
-                       offline = ISC_FALSE;
                        while (t != NULL &&
                               dns_name_equal(&t->name, name) &&
                               t->op == op &&
@@ -323,8 +321,6 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
                                                namebuf, typebuf, classbuf,
                                                (unsigned long) t->ttl,
                                                (unsigned long) rdl.ttl);
-                               if (t->rdata.flags & DNS_RDATA_OFFLINE)
-                                       offline = ISC_TRUE;
                                ISC_LIST_APPEND(rdl.rdata, &t->rdata, link);
                                t = ISC_LIST_NEXT(t, link);
                        }
@@ -528,7 +524,6 @@ dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare) {
        v = isc_mem_get(diff->mctx, length * sizeof(dns_difftuple_t *));
        if (v == NULL)
                return (ISC_R_NOMEMORY);
-       i = 0;
        for (i = 0; i < length; i++) {
                p = ISC_LIST_HEAD(diff->tuples);
                v[i] = p;
index b5dfb922c2c74420d0e1c3d98b3e370b4e91703b..33bdc4a44313ee64fd1a2e73f43aa316f30fa500 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dispatch.c,v 1.168.248.2 2011/02/28 01:20:01 tbox Exp $ */
+/* $Id: dispatch.c,v 1.168.248.3 2011/03/11 06:47:03 marka Exp $ */
 
 /*! \file */
 
@@ -1295,7 +1295,6 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
         * Look at flags.  If query, drop it. If response,
         * look to see where it goes.
         */
-       queue_response = ISC_FALSE;
        if ((flags & DNS_MESSAGEFLAG_QR) == 0) {
                /* query */
                free_buffer(disp, ev->region.base, ev->region.length);
@@ -1554,7 +1553,6 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) {
         * Look at flags.  If query, drop it. If response,
         * look to see where it goes.
         */
-       queue_response = ISC_FALSE;
        if ((flags & DNS_MESSAGEFLAG_QR) == 0) {
                /*
                 * Query.
@@ -2373,9 +2371,9 @@ qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
                qid->sock_table = isc_mem_get(mgr->mctx, buckets *
                                              sizeof(dispsocketlist_t));
                if (qid->sock_table == NULL) {
-                       isc_mem_put(mgr->mctx, qid, sizeof(*qid));
                        isc_mem_put(mgr->mctx, qid->qid_table,
                                    buckets * sizeof(dns_displist_t));
+                       isc_mem_put(mgr->mctx, qid, sizeof(*qid));
                        return (ISC_R_NOMEMORY);
                }
        }
@@ -2985,7 +2983,6 @@ dns_dispatch_detach(dns_dispatch_t **dispp) {
 
        INSIST(disp->refcount > 0);
        disp->refcount--;
-       killit = ISC_FALSE;
        if (disp->refcount == 0) {
                if (disp->recv_pending > 0)
                        isc_socket_cancel(disp->socket, disp->task[0],
@@ -3258,7 +3255,6 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp,
        disp->requests--;
        INSIST(disp->refcount > 0);
        disp->refcount--;
-       killit = ISC_FALSE;
        if (disp->refcount == 0) {
                if (disp->recv_pending > 0)
                        isc_socket_cancel(disp->socket, disp->task[0],
index f7e56bb1a1f377562c474c9640d8b9c179531aa1..04e2bde501f4d7d2188e94039f38f45977e8442c 100644 (file)
@@ -50,7 +50,7 @@
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dlz.c,v 1.10 2010/12/20 23:47:20 tbox Exp $ */
+/* $Id: dlz.c,v 1.10.14.1 2011/03/11 06:47:03 marka Exp $ */
 
 /*! \file */
 
@@ -535,7 +535,6 @@ dns_dlz_writeablezone(dns_view_t *view, const char *zone_name) {
        isc_buffer_t buffer;
        dns_fixedname_t fixorigin;
        dns_name_t *origin;
-       dns_rdataclass_t zclass;
        dns_dlzdb_t *dlzdatabase;
 
        REQUIRE(DNS_DLZ_VALID(view->dlzdatabase));
@@ -553,8 +552,6 @@ dns_dlz_writeablezone(dns_view_t *view, const char *zone_name) {
                goto cleanup;
        origin = dns_fixedname_name(&fixorigin);
 
-       zclass = view->rdclass;
-
        /* See if the zone already exists */
        result = dns_view_findzone(view, origin, &dupzone);
        if (result == ISC_R_SUCCESS) {
@@ -593,8 +590,6 @@ dns_dlz_writeablezone(dns_view_t *view, const char *zone_name) {
         */
        result = dns_view_addzone(view, zone);
 
-       result = ISC_R_SUCCESS;
-
  cleanup:
        if (zone != NULL)
                dns_zone_detach(&zone);
index 292950ce20da452c2f8b57f11c4f6e38cd19f4d3..ba1632d5ad9fa83d172346b49ed55e2e2e2769d7 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- * $Id: dnssec.c,v 1.119 2010/01/13 23:48:59 tbox Exp $
+ * $Id: dnssec.c,v 1.119.170.1 2011/03/11 06:47:03 marka Exp $
  */
 
 /*! \file */
@@ -553,6 +553,7 @@ key_active(dst_key_t *key) {
 
        /* Is this an old-style key? */
        result = dst_key_getprivateformat(key, &major, &minor);
+       RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
        /*
         * Smart signing started with key format 1.3; prior to that, all
@@ -1095,6 +1096,7 @@ dns_dnsseckey_create(isc_mem_t *mctx, dst_key_t **dstkey,
 
        /* Is this an old-style key? */
        result = dst_key_getprivateformat(dk->key, &major, &minor);
+       INSIST(result == ISC_R_SUCCESS);
 
        /* Smart signing started with key format 1.3 */
        dk->legacy = ISC_TF(major == 1 && minor <= 2);
@@ -1673,9 +1675,6 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
 
                /* No match found in keys; add the new key. */
                if (key2 == NULL) {
-                       dns_dnsseckey_t *next;
-
-                       next = ISC_LIST_NEXT(key1, link);
                        ISC_LIST_UNLINK(*newkeys, key1, link);
                        ISC_LIST_APPEND(*keys, key1, link);
 
index 7de3227c4b83bf08c9c451a37a4faccd76ec704e..0e96b7190e2862e7702632bcddc72f7bb48c0371 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: journal.c,v 1.112 2010/11/17 23:47:08 tbox Exp $ */
+/* $Id: journal.c,v 1.112.38.1 2011/03/11 06:47:03 marka Exp $ */
 
 #include <config.h>
 
@@ -163,7 +163,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
 
        dns_rdataset_disassociate(&rdataset);
        dns_db_detachnode(db, &node);
-       return (ISC_R_SUCCESS);
+       return (result);
 
  freenode:
        dns_db_detachnode(db, &node);
@@ -2170,6 +2170,7 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, isc_uint32_t serial,
                CHECK(journal_fsync(new));
 
                indexend = new->header.end.offset;
+               POST(indexend);
        }
 
        /*
index 49e2985c2c6e27a4e87162ef9853de2ad2a4d169..135badb3e9e172435f20f22a77aa290703f6d5cb 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: master.c,v 1.178 2009/09/01 00:22:26 jinmei Exp $ */
+/* $Id: master.c,v 1.178.346.1 2011/03/11 06:47:03 marka Exp $ */
 
 /*! \file */
 
@@ -1205,9 +1205,10 @@ load_text(dns_loadctx_t *lctx) {
                                                goto insist_and_cleanup;
                                        }
                                        ictx = lctx->inc;
-                                       line = isc_lex_getsourceline(lctx->lex);
                                        source =
                                               isc_lex_getsourcename(lctx->lex);
+                                       line = isc_lex_getsourceline(lctx->lex);
+                                       POST(line);
                                        continue;
                                }
                                /*
@@ -1417,8 +1418,9 @@ load_text(dns_loadctx_t *lctx) {
                                        goto insist_and_cleanup;
                                }
                                ictx = lctx->inc;
-                               line = isc_lex_getsourceline(lctx->lex);
                                source = isc_lex_getsourcename(lctx->lex);
+                               line = isc_lex_getsourceline(lctx->lex);
+                               POST(line);
                                continue;
                        }
 
@@ -2123,6 +2125,7 @@ load_raw(dns_loadctx_t *lctx) {
 
                /* Empty read: currently, we do not use dumptime */
                dumptime = isc_buffer_getuint32(&target);
+               POST(dumptime);
 
                lctx->first = ISC_FALSE;
        }
@@ -2295,7 +2298,6 @@ load_raw(dns_loadctx_t *lctx) {
                                isc_buffer_forward(&target, consumed_name);
 
                                rdcount -= i;
-                               i = 0;
 
                                goto continue_read;
                        }
@@ -2679,7 +2681,6 @@ grow_rdatalist(int new_len, dns_rdatalist_t *old, int old_len,
                return (NULL);
 
        ISC_LIST_INIT(save);
-       this = ISC_LIST_HEAD(*current);
        while ((this = ISC_LIST_HEAD(*current)) != NULL) {
                ISC_LIST_UNLINK(*current, this, link);
                ISC_LIST_APPEND(save, this, link);
@@ -2692,7 +2693,6 @@ grow_rdatalist(int new_len, dns_rdatalist_t *old, int old_len,
        }
 
        ISC_LIST_INIT(save);
-       this = ISC_LIST_HEAD(*glue);
        while ((this = ISC_LIST_HEAD(*glue)) != NULL) {
                ISC_LIST_UNLINK(*glue, this, link);
                ISC_LIST_APPEND(save, this, link);
index c7bfbde0bc37ed88499c479bee73296cd63ac36f..34a11033a2a7d6fe9b10424aded419b3f52e0668 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.99.258.2 2011/03/11 01:28:21 each Exp $ */
+/* $Id: masterdump.c,v 1.99.258.3 2011/03/11 06:47:03 marka Exp $ */
 
 /*! \file */
 
@@ -1072,6 +1072,8 @@ dump_rdatasets_raw(isc_mem_t *mctx, dns_name_t *name,
                                                   buffer, f);
                }
                dns_rdataset_disassociate(&rdataset);
+               if (result != ISC_R_SUCCESS)
+                       return (result);
        }
 
        if (result == ISC_R_NOMORE)
@@ -1767,6 +1769,14 @@ dns_master_dumpnode(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
 
        result = dns_master_dumpnodetostream(mctx, db, version, node, name,
                                             style, f);
+       if (result != ISC_R_SUCCESS) {
+               isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
+                             DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
+                             "dumping master file: %s: dump: %s", filename,
+                             isc_result_totext(result));
+               (void)isc_stdio_close(f);
+               return (ISC_R_UNEXPECTED);
+       }
 
        result = isc_stdio_close(f);
        if (result != ISC_R_SUCCESS) {
index 8eac143f52098a6d7086451a45cab72b7731ea29..4f25f883a9044ea599fda49593e9e97828f58473 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: message.c,v 1.254 2010/06/03 05:23:27 marka Exp $ */
+/* $Id: message.c,v 1.254.114.1 2011/03/11 06:47:04 marka Exp $ */
 
 /*! \file */
 
@@ -1194,7 +1194,6 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
 
                skip_name_search = ISC_FALSE;
                skip_type_search = ISC_FALSE;
-               free_name = ISC_FALSE;
                free_rdataset = ISC_FALSE;
 
                name = isc_mempool_get(msg->namepool);
@@ -2930,6 +2929,7 @@ dns_message_signer(dns_message_t *msg, dns_name_t *signer) {
                dns_rdataset_current(msg->tsig, &rdata);
 
                result = dns_rdata_tostruct(&rdata, &tsig, NULL);
+               INSIST(result == ISC_R_SUCCESS);
                if (msg->tsigstatus != dns_rcode_noerror)
                        result = DNS_R_TSIGVERIFYFAILURE;
                else if (tsig.error != dns_rcode_noerror)
index 85fa142f847a52ff0dda42e0b493b5d5c0c2cbc5..89742dacc0e6e0116d7de26929b7202fc63b13fa 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: name.c,v 1.174 2011/01/13 04:59:25 tbox Exp $ */
+/* $Id: name.c,v 1.174.8.1 2011/03/11 06:47:04 marka Exp $ */
 
 /*! \file */
 
@@ -1024,12 +1024,13 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
                  const dns_name_t *origin, unsigned int options,
                  isc_buffer_t *target)
 {
-       unsigned char *ndata, *label;
+       unsigned char *ndata, *label = NULL;
        char *tdata;
        char c;
        ft_state state;
-       unsigned int value, count;
-       unsigned int n1, n2, tlen, nrem, nused, digits, labels, tused;
+       unsigned int value = 0, count = 0;
+       unsigned int n1 = 0, n2 = 0;
+       unsigned int tlen, nrem, nused, digits = 0, labels, tused;
        isc_boolean_t done;
        unsigned char *offsets;
        dns_offsets_t odata;
@@ -1062,16 +1063,6 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
        INIT_OFFSETS(name, offsets, odata);
        offsets[0] = 0;
 
-       /*
-        * Initialize things to make the compiler happy; they're not required.
-        */
-       n1 = 0;
-       n2 = 0;
-       label = NULL;
-       digits = 0;
-       value = 0;
-       count = 0;
-
        /*
         * Make 'name' empty in case of failure.
         */
@@ -1171,6 +1162,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
                                return (DNS_R_BADLABELTYPE);
                        }
                        state = ft_escape;
+                       POST(state);
                        /* FALLTHROUGH */
                case ft_escape:
                        if (!isdigit(c & 0xff)) {
@@ -1236,6 +1228,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
                        label = origin->ndata;
                        n1 = origin->length;
                        nrem -= n1;
+                       POST(nrem);
                        while (n1 > 0) {
                                n2 = *label++;
                                INSIST(n2 <= 63); /* no bitstring support */
index 7e95396605b7a57faeac2d9081f8798d52cc25c0..40d1e86014a6916cb0ebba1627124f0b2bb6d06e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsec.c,v 1.13 2009/01/06 23:47:57 tbox Exp $ */
+/* $Id: nsec.c,v 1.13.428.1 2011/03/11 06:47:04 marka Exp $ */
 
 /*! \file */
 
@@ -182,7 +182,7 @@ dns_nsec_build(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
                                    0, NULL);
        if (result == DNS_R_UNCHANGED)
                result = ISC_R_SUCCESS;
-       RETERR(result);
+
  failure:
        if (dns_rdataset_isassociated(&rdataset))
                dns_rdataset_disassociate(&rdataset);
index e1caac776f36115ab79b5e30f3f3bc909449cf12..d770d782b7997fa4c64d86922b88cc8565a02429 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsec3.c,v 1.19 2010/12/07 02:53:34 marka Exp $ */
+/* $Id: nsec3.c,v 1.19.24.1 2011/03/11 06:47:04 marka Exp $ */
 
 #include <config.h>
 
@@ -557,7 +557,7 @@ dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdataset_t rdataset;
        int pass;
-       isc_boolean_t exists;
+       isc_boolean_t exists = ISC_FALSE;
        isc_boolean_t maybe_remove_unsecure = ISC_FALSE;
        isc_uint8_t flags;
        isc_buffer_t buffer;
index b623cc80ec2f330a22ec8123fe1d6b5720293952..00e637d6e1909e71fc55c2bca70a4cc15096df1d 100644 (file)
@@ -29,7 +29,7 @@
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: openssldsa_link.c,v 1.20 2011/01/11 23:47:13 tbox Exp $ */
+/* $Id: openssldsa_link.c,v 1.20.10.1 2011/03/11 06:47:04 marka Exp $ */
 
 #ifdef OPENSSL
 #ifndef USE_EVP
@@ -252,7 +252,6 @@ openssldsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        dsasig->r = BN_bin2bn(cp, ISC_SHA1_DIGESTLENGTH, NULL);
        cp += ISC_SHA1_DIGESTLENGTH;
        dsasig->s = BN_bin2bn(cp, ISC_SHA1_DIGESTLENGTH, NULL);
-       cp += ISC_SHA1_DIGESTLENGTH;
 
 #if 0
        pkey = EVP_PKEY_new();
index c0f41b810d75909f09e8af4a72f74cb9e0fb8603..b99b9284a19495249161f21a1f8a1b278c9ad0cc 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbt.c,v 1.146 2009/10/27 04:46:58 marka Exp $ */
+/* $Id: rbt.c,v 1.146.278.1 2011/03/11 06:47:04 marka Exp $ */
 
 /*! \file */
 
@@ -718,6 +718,7 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
                 */
                compared = dns_namereln_none;
                last_compared = NULL;
+               order = 0;
        }
 
        dns_fixedname_init(&fixedcallbackname);
@@ -1084,6 +1085,7 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
                                                                &current_name,
                                                                &order,
                                                                &common_labels);
+                                       POST(compared);
 
                                        last_compared = current;
 
@@ -1526,7 +1528,7 @@ rehash(dns_rbt_t *rbt) {
 
        oldsize = rbt->hashsize;
        oldtable = rbt->hashtable;
-       rbt->hashsize *= 2 + 1;
+       rbt->hashsize = rbt->hashsize * 2 + 1;
        rbt->hashtable = isc_mem_get(rbt->mctx,
                                     rbt->hashsize * sizeof(dns_rbtnode_t *));
        if (rbt->hashtable == NULL) {
@@ -1683,6 +1685,7 @@ dns_rbt_addonlevel(dns_rbtnode_t *node, dns_rbtnode_t *current, int order,
        }
 
        child = root;
+       POST(child);
 
        dns_name_init(&add_name, add_offsets);
        NODENAME(node, &add_name);
index 04cf1df46ac86fbbb4290fbac2fdf233ba84a743..cd60c5c8d2f80c2acb7b373d1a63c79b6e637d25 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbtdb.c,v 1.310.8.3 2011/03/03 04:43:01 each Exp $ */
+/* $Id: rbtdb.c,v 1.310.8.4 2011/03/11 06:47:04 marka Exp $ */
 
 /*! \file */
 
@@ -4105,6 +4105,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
         */
        if (search.need_cleanup) {
                node = search.zonecut;
+               INSIST(node != NULL);
                lock = &(search.rbtdb->node_locks[node->locknum].lock);
 
                NODE_LOCK(lock, isc_rwlocktype_read);
@@ -4406,6 +4407,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
                                        NODE_UNLOCK(lock, locktype);
                                        NODE_LOCK(lock, isc_rwlocktype_write);
                                        locktype = isc_rwlocktype_write;
+                                       POST(locktype);
                                }
                                if (need_headerupdate(found, search->now))
                                        update_header(search->rbtdb, found,
@@ -4910,15 +4912,9 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                                    cname_ok &&
                                    cnamesig != NULL) {
                                        /*
-                                        * If we've already got the CNAME RRSIG,
-                                        * use it, otherwise change sigtype
-                                        * so that we find it.
+                                        * If we've already got the
+                                        * CNAME RRSIG, use it.
                                         */
-                                       if (cnamesig != NULL)
-                                               foundsig = cnamesig;
-                                       else
-                                               sigtype =
-                                                   RBTDB_RDATATYPE_SIGCNAME;
                                        foundsig = cnamesig;
                                }
                        } else if (header->type == sigtype) {
@@ -5064,6 +5060,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                NODE_UNLOCK(lock, locktype);
                NODE_LOCK(lock, isc_rwlocktype_write);
                locktype = isc_rwlocktype_write;
+               POST(locktype);
        }
        if (update != NULL && need_headerupdate(update, search.now))
                update_header(search.rbtdb, update, search.now);
@@ -5081,6 +5078,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
         */
        if (search.need_cleanup) {
                node = search.zonecut;
+               INSIST(node != NULL);
                lock = &(search.rbtdb->node_locks[node->locknum].lock);
 
                NODE_LOCK(lock, isc_rwlocktype_read);
@@ -5246,6 +5244,7 @@ cache_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
                        NODE_UNLOCK(lock, locktype);
                        NODE_LOCK(lock, isc_rwlocktype_write);
                        locktype = isc_rwlocktype_write;
+                       POST(locktype);
                }
                if (need_headerupdate(found, search.now))
                        update_header(search.rbtdb, found, search.now);
index 64fc40e13ed0a0b0b06d52cd4d1356209332cb76..1047cec04cf4abb870049d1e63214c2d58d5eda9 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdata.c,v 1.209.8.1 2011/02/21 06:43:23 marka Exp $ */
+/* $Id: rdata.c,v 1.209.8.2 2011/03/11 06:47:05 marka Exp $ */
 
 /*! \file */
 
@@ -708,6 +708,7 @@ rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
        if (use_default) {
                strlcpy(buf, "\\# ", sizeof(buf));
                result = str_totext(buf, target);
+               INSIST(result == ISC_R_SUCCESS);
                dns_rdata_toregion(rdata, &sr);
                INSIST(sr.length < 65536);
                snprintf(buf, sizeof(buf), "%u", sr.length);
index 71e6c5156243c602e568f712a4ad8d98b8cb6ab9..58e217fc12cfac9f41b1df1a7d84ca904f54a811 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdataset.c,v 1.86 2010/02/25 05:08:01 tbox Exp $ */
+/* $Id: rdataset.c,v 1.86.148.1 2011/03/11 06:47:05 marka Exp $ */
 
 /*! \file */
 
@@ -299,7 +299,7 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
        dns_rdata_t rdata = DNS_RDATA_INIT;
        isc_region_t r;
        isc_result_t result;
-       unsigned int i, count, added, choice;
+       unsigned int i, count = 0, added, choice;
        isc_buffer_t savedbuffer, rdlen, rrbuffer;
        unsigned int headlen;
        isc_boolean_t question = ISC_FALSE;
@@ -319,7 +319,6 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
        REQUIRE((order == NULL) == (order_arg == NULL));
        REQUIRE(cctx != NULL && cctx->mctx != NULL);
 
-       count = 0;
        if ((rdataset->attributes & DNS_RDATASETATTR_QUESTION) != 0) {
                question = ISC_TRUE;
                count = 1;
index 860af00db7b391c554aa9a15d876fdd48fac4385..1466d0a69fac67e2f130a2b7d889ab38dadea8cd 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: request.c,v 1.87 2010/03/04 23:50:34 tbox Exp $ */
+/* $Id: request.c,v 1.87.148.1 2011/03/11 06:47:05 marka Exp $ */
 
 /*! \file */
 
@@ -428,12 +428,10 @@ req_send(dns_request_t *request, isc_task_t *task, isc_sockaddr_t *address) {
        isc_region_t r;
        isc_socket_t *socket;
        isc_result_t result;
-       unsigned int dispattr;
 
        req_log(ISC_LOG_DEBUG(3), "req_send: request %p", request);
 
        REQUIRE(VALID_REQUEST(request));
-       dispattr = dns_dispatch_getattributes(request->dispatch);
        socket = req_getsocket(request);
        isc_buffer_usedregion(request->query, &r);
        /*
index e07d2a293cfd5232d42d8465ffdfc6e21e9141f4..bc8f5e64404485218a3f7263b81b36fb63e48e2b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.428.6.5 2011/02/18 23:41:51 mgraff Exp $ */
+/* $Id: resolver.c,v 1.428.6.6 2011/03/11 06:47:05 marka Exp $ */
 
 /*! \file */
 
@@ -2544,7 +2544,7 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
        isc_result_t result;
        dns_resolver_t *res;
        isc_stdtime_t now;
-       unsigned int stdoptions;
+       unsigned int stdoptions = 0;
        isc_sockaddr_t *sa;
        dns_adbaddrinfo_t *ai;
        isc_boolean_t all_bad;
@@ -2563,7 +2563,6 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
        }
 
        res = fctx->res;
-       stdoptions = 0;         /* Keep compiler happy. */
 
        /*
         * Forwarders.
@@ -4246,6 +4245,8 @@ validated(isc_task_t *task, isc_event_t *event) {
                                                            sigrdataset, 0,
                                                            NULL);
                        dns_db_detachnode(fctx->cache, &nsnode);
+                       if (result != ISC_R_SUCCESS)
+                               continue;
                }
                result = dns_message_nextname(fctx->rmessage,
                                              DNS_SECTION_AUTHORITY);
@@ -4308,6 +4309,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
 
        res = fctx->res;
        need_validation = ISC_FALSE;
+       POST(need_validation);
        secure_domain = ISC_FALSE;
        have_answer = ISC_FALSE;
        eresult = ISC_R_SUCCESS;
@@ -4775,6 +4777,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
 
        res = fctx->res;
        need_validation = ISC_FALSE;
+       POST(need_validation);
        secure_domain = ISC_FALSE;
        eresult = ISC_R_SUCCESS;
        name = &fctx->name;
@@ -5683,6 +5686,7 @@ answer_response(fetchctx_t *fctx) {
        chaining = ISC_FALSE;
        have_answer = ISC_FALSE;
        want_chaining = ISC_FALSE;
+       POST(want_chaining);
        if ((message->flags & DNS_MESSAGEFLAG_AA) != 0)
                aa = ISC_TRUE;
        else
@@ -5906,6 +5910,7 @@ answer_response(fetchctx_t *fctx) {
                                        }
                                        found = ISC_TRUE;
                                        want_chaining = ISC_TRUE;
+                                       POST(want_chaining);
                                        aflag = DNS_RDATASETATTR_ANSWER;
                                        result = dname_target(fctx, rdataset,
                                                              qname, name,
@@ -5917,6 +5922,7 @@ answer_response(fetchctx_t *fctx) {
                                                 * try to continue.
                                                 */
                                                want_chaining = ISC_FALSE;
+                                               POST(want_chaining);
                                        } else if (result != ISC_R_SUCCESS)
                                                return (result);
                                        else
@@ -6781,6 +6787,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        unsigned int version;
 
                        resend = ISC_TRUE;
+                       INSIST(opt != NULL);
                        version = (opt->ttl >> 16) & 0xff;
                        flags = (version << DNS_FETCHOPT_EDNSVERSIONSHIFT) |
                                DNS_FETCHOPT_EDNSVERSIONSET;
@@ -8275,10 +8282,8 @@ dns_resolver_addbadcache(dns_resolver_t *resolver, dns_name_t *name,
                resolver->badcache = isc_mem_get(resolver->mctx,
                                                 sizeof(*resolver->badcache) *
                                                 DNS_BADCACHE_SIZE);
-               if (resolver->badcache == NULL) {
-                       result = ISC_R_NOMEMORY;
+               if (resolver->badcache == NULL)
                        goto cleanup;
-               }
                resolver->badhash = DNS_BADCACHE_SIZE;
                memset(resolver->badcache, 0, sizeof(*resolver->badcache) *
                       resolver->badhash);
@@ -8308,10 +8313,8 @@ dns_resolver_addbadcache(dns_resolver_t *resolver, dns_name_t *name,
        if (bad == NULL) {
                isc_buffer_t buffer;
                bad = isc_mem_get(resolver->mctx, sizeof(*bad) + name->length);
-               if (bad == NULL) {
-                       result = ISC_R_NOMEMORY;
+               if (bad == NULL)
                        goto cleanup;
-               }
                bad->type = type;
                bad->hashval = hashval;
                isc_buffer_init(&buffer, bad + 1, name->length);
index 8589b3bc243de3017c3d1f0301b59ad1b6da3d16..1ba0bdf058e13b399b6fdb2baa3115f6bd33163a 100644 (file)
@@ -50,7 +50,7 @@
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: sdlz.c,v 1.31 2011/01/13 06:29:16 marka Exp $ */
+/* $Id: sdlz.c,v 1.31.8.1 2011/03/11 06:47:05 marka Exp $ */
 
 /*! \file */
 
@@ -336,7 +336,7 @@ destroy(dns_sdlz_db_t *sdlz) {
        sdlz->common.magic = 0;
        sdlz->common.impmagic = 0;
 
-       isc_mutex_destroy(&sdlz->refcnt_lock);
+       (void)isc_mutex_destroy(&sdlz->refcnt_lock);
 
        dns_name_free(&sdlz->common.origin, mctx);
 
index 2d086dcc30a56a6c524c23b5c69686774b563c21..2c65e9814c5134e989790bbc07985eac15fb5584 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- * $Id: tkey.c,v 1.100 2011/01/08 23:47:01 tbox Exp $
+ * $Id: tkey.c,v 1.100.12.1 2011/03/11 06:47:05 marka Exp $
  */
 /*! \file */
 #include <config.h>
@@ -75,7 +75,9 @@ _dns_tkey_dumpmessage(dns_message_t *msg) {
        isc_buffer_init(&outbuf, output, sizeof(output));
        result = dns_message_totext(msg, &dns_master_style_debug, 0,
                                    &outbuf);
-       /* XXXMLG ignore result */
+       if (result != ISC_R_SUCCESS)
+               fprintf(stderr, "Warning: dns_message_totext returned: %s\n",
+                       dns_result_totext(result));
        fprintf(stderr, "%.*s\n", (int)isc_buffer_usedlength(&outbuf),
                (char *)isc_buffer_base(&outbuf));
 }
@@ -179,8 +181,10 @@ add_rdata_to_list(dns_message_t *msg, dns_name_t *name, dns_rdata_t *rdata,
 
  failure:
        if (newrdata != NULL) {
-               if (ISC_LINK_LINKED(newrdata, link))
+               if (ISC_LINK_LINKED(newrdata, link)) {
+                       INSIST(newlist != NULL);
                        ISC_LIST_UNLINK(newlist->rdata, newrdata, link);
+               }
                dns_message_puttemprdata(msg, &newrdata);
        }
        if (newname != NULL)
@@ -518,7 +522,7 @@ process_gsstkey(dns_name_t *name, dns_rdata_tkey_t *tkeyin,
                tkeyout->expire = expire;
        } else {
                tkeyout->inception = tsigkey->inception;
-               tkeyout->expire = tkeyout->expire;
+               tkeyout->expire = tsigkey->expire;
                dns_tsigkey_detach(&tsigkey);
        }
 
index 9d0dec52ff5c09409aa40c0f8de65bfb4cc0bfdd..b3bca91175f87bf6e17ea3b2b4ac3904dd285ffa 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ttl.c,v 1.29 2007/06/19 23:47:16 tbox Exp $ */
+/* $Id: ttl.c,v 1.29.814.1 2011/03/11 06:47:06 marka Exp $ */
 
 /*! \file */
 
@@ -86,6 +86,7 @@ dns_ttl_totext(isc_uint32_t src, isc_boolean_t verbose, isc_buffer_t *target) {
        hours = src % 24;  src /= 24;
        days = src % 7;    src /= 7;
        weeks = src;       src = 0;
+       POST(src);
 
        x = 0;
        if (weeks != 0) {
index c233db70a691ec0a883c92ec7890b2b9c986d438..9b857caa75b8c0af93ffab22f4266f1d8c0f9471 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: validator.c,v 1.197.14.4 2011/03/01 14:42:16 smann Exp $ */
+/* $Id: validator.c,v 1.197.14.5 2011/03/11 06:47:06 marka Exp $ */
 
 #include <config.h>
 
@@ -328,7 +328,6 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
        dns_fixedname_init(&fixed);
        dns_name_downcase(name, dns_fixedname_name(&fixed), NULL);
        name = dns_fixedname_name(&fixed);
-       result = dns_rdataset_first(rdataset);
        for (result = dns_rdataset_first(rdataset);
             result == ISC_R_SUCCESS;
             result = dns_rdataset_next(rdataset))
@@ -1290,7 +1289,6 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
        dns_validatorevent_t *devent;
        dns_validator_t *val;
        dns_rdataset_t *rdataset;
-       dns_rdataset_t *sigrdataset;
        isc_boolean_t want_destroy;
        isc_result_t result;
        isc_boolean_t exists, data;
@@ -1300,7 +1298,6 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
 
        devent = (dns_validatorevent_t *)event;
        rdataset = devent->rdataset;
-       sigrdataset = devent->sigrdataset;
        val = devent->ev_arg;
        result = devent->result;
        dns_validator_destroy(&val->subvalidator);
@@ -2509,8 +2506,10 @@ validatezonekey(dns_validator_t *val) {
                                validator_log(val, ISC_LOG_DEBUG(2),
                                              "unsigned DS record");
                                return (DNS_R_NOVALIDSIG);
-                       } else
+                       } else {
                                result = ISC_R_SUCCESS;
+                               POST(result);
+                       }
                } else if (result == ISC_R_NOTFOUND) {
                        /*
                         * We don't have the DS.  Find it.
@@ -2908,6 +2907,7 @@ findnsec3proofs(dns_validator_t *val) {
        }
        if (result != ISC_R_NOMORE)
                result = ISC_R_SUCCESS;
+       POST(result);
 
        if (dns_name_countlabels(zonename) == 0)
                return (ISC_R_SUCCESS);
@@ -4076,9 +4076,9 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
                     isc_task_t *task, isc_taskaction_t action, void *arg,
                     dns_validator_t **validatorp)
 {
-       isc_result_t result;
+       isc_result_t result = ISC_R_FAILURE;
        dns_validator_t *val;
-       isc_task_t *tclone;
+       isc_task_t *tclone = NULL;
        dns_validatorevent_t *event;
 
        REQUIRE(name != NULL);
@@ -4086,9 +4086,6 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
                (rdataset == NULL && sigrdataset == NULL && message != NULL));
        REQUIRE(validatorp != NULL && *validatorp == NULL);
 
-       tclone = NULL;
-       result = ISC_R_FAILURE;
-
        val = isc_mem_get(view->mctx, sizeof(*val));
        if (val == NULL)
                return (ISC_R_NOMEMORY);
index 44f868c20cc7a4d0621454a017a714431b685468..c03bcc43d266d2a974c69e0ea712b0af65d559f9 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: view.c,v 1.178 2011/01/13 09:53:04 marka Exp $ */
+/* $Id: view.c,v 1.178.8.1 2011/03/11 06:47:06 marka Exp $ */
 
 /*! \file */
 
@@ -1160,7 +1160,7 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
 {
        isc_result_t result;
        dns_db_t *db;
-       isc_boolean_t is_cache, use_zone, try_hints, is_staticstub_zone;
+       isc_boolean_t is_cache, use_zone, try_hints;
        dns_zone_t *zone;
        dns_name_t *zfname;
        dns_rdataset_t zrdataset, zsigrdataset;
@@ -1172,7 +1172,6 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
        db = NULL;
        zone = NULL;
        use_zone = ISC_FALSE;
-       is_staticstub_zone = ISC_FALSE;
        try_hints = ISC_FALSE;
        zfname = NULL;
 
@@ -1188,11 +1187,8 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
         */
 #ifdef BIND9
        result = dns_zt_find(view->zonetable, name, 0, NULL, &zone);
-       if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
+       if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
                result = dns_zone_getdb(zone, &db);
-               if (dns_zone_gettype(zone) == dns_zone_staticstub)
-                       is_staticstub_zone = ISC_TRUE;
-       }
 #else
        result = ISC_R_NOTFOUND;
 #endif
@@ -1391,6 +1387,7 @@ dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name,
                if (result == DNS_R_PARTIALMATCH) {
                        dns_zone_detach(zp);
                        result = ISC_R_NOTFOUND;
+                       POST(result);
                }
 
                if (zone2 != NULL) {
index 337ae31b15885f8b4f002dd6f90dc5fa76f19689..57116471d1051407cebbdf588c92f132c1fa6065 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: xfrin.c,v 1.166.522.3 2011/02/28 01:20:02 tbox Exp $ */
+/* $Id: xfrin.c,v 1.166.522.4 2011/03/11 06:47:06 marka Exp $ */
 
 /*! \file */
 
@@ -1247,7 +1247,7 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
                        result = DNS_R_UNEXPECTEDID;
                if (xfr->reqtype == dns_rdatatype_axfr ||
                    xfr->reqtype == dns_rdatatype_soa)
-                       FAIL(result);
+                       goto failure;
                xfrin_log(xfr, ISC_LOG_DEBUG(3), "got %s, retrying with AXFR",
                       isc_result_totext(result));
  try_axfr:
@@ -1283,7 +1283,7 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
        if (result != ISC_R_SUCCESS) {
                xfrin_log(xfr, ISC_LOG_DEBUG(3), "TSIG check failed: %s",
                       isc_result_totext(result));
-               FAIL(result);
+               goto failure;
        }
 
        for (result = dns_message_firstname(msg, DNS_SECTION_ANSWER);
index 8fc24ca09ff0bfa16d4fd19f087ec881ec09871b..73c52e91a8686224db52ae6678fe734fdc7d6a69 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.582.8.10 2011/03/01 23:47:38 tbox Exp $ */
+/* $Id: zone.c,v 1.582.8.11 2011/03/11 06:47:06 marka Exp $ */
 
 /*! \file */
 
@@ -1993,8 +1993,7 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                                dns_rdataset_disassociate(&aaaa);
                        return (answer);
                }
-       } else
-               tresult = result;
+       }
 
        dns_name_format(owner, ownerbuf, sizeof ownerbuf);
        dns_name_format(name, namebuf, sizeof namebuf);
@@ -4893,7 +4892,7 @@ zone_resigninc(dns_zone_t *zone) {
        }
 
        /* Write changes to journal file. */
-       zone_journal(zone, &sig_diff, "zone_resigninc");
+       CHECK(zone_journal(zone, &sig_diff, "zone_resigninc"));
 
        /* Everything has succeeded. Commit the changes. */
        dns_db_closeversion(db, &version, ISC_TRUE);
@@ -5633,11 +5632,11 @@ zone_nsec3chain(dns_zone_t *zone) {
        dns_nsec3chainlist_t cleanup;
        dst_key_t *zone_keys[MAXZONEKEYS];
        isc_int32_t signatures;
-       isc_boolean_t check_ksk, keyset_kskonly, is_ksk;
+       isc_boolean_t check_ksk, keyset_kskonly;
        isc_boolean_t delegation;
        isc_boolean_t first;
        isc_result_t result;
-       isc_stdtime_t now, inception, soaexpire, expire, stop;
+       isc_stdtime_t now, inception, soaexpire, expire;
        isc_uint32_t jitter;
        unsigned int i;
        unsigned int nkeys = 0;
@@ -5702,7 +5701,6 @@ zone_nsec3chain(dns_zone_t *zone) {
         */
        isc_random_get(&jitter);
        expire = soaexpire - jitter % 3600;
-       stop = now + 5;
 
        check_ksk = DNS_ZONE_OPTION(zone, DNS_ZONEOPT_UPDATECHECKKSK);
        keyset_kskonly = DNS_ZONE_OPTION(zone, DNS_ZONEOPT_DNSKEYKSKONLY);
@@ -5748,8 +5746,6 @@ zone_nsec3chain(dns_zone_t *zone) {
                if (NSEC3REMOVE(nsec3chain->nsec3param.flags))
                        goto next_addchain;
 
-               is_ksk = ISC_FALSE;
-               delegation = ISC_FALSE;
                dns_dbiterator_current(nsec3chain->dbiterator, &node, name);
 
                if (nsec3chain->delete_nsec) {
@@ -6135,6 +6131,12 @@ zone_nsec3chain(dns_zone_t *zone) {
                result = dns_db_getoriginnode(db, &node);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
                result = dns_db_allrdatasets(db, node, version, 0, &iterator);
+               if (result != ISC_R_SUCCESS) {
+                       dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
+                                    "dns_db_allrdatasets -> %s\n",
+                                    dns_result_totext(result));
+                       goto failure;
+               }
                for (result = dns_rdatasetiter_first(iterator);
                     result == ISC_R_SUCCESS;
                     result = dns_rdatasetiter_next(iterator)) {
@@ -6257,7 +6259,7 @@ zone_nsec3chain(dns_zone_t *zone) {
        }
 
        /* Write changes to journal file. */
-       zone_journal(zone, &sig_diff, "zone_nsec3chain");
+       CHECK(zone_journal(zone, &sig_diff, "zone_nsec3chain"));
 
        LOCK_ZONE(zone);
        zone_needdump(zone, DNS_DUMP_DELAY);
@@ -6467,12 +6469,11 @@ zone_sign(dns_zone_t *zone) {
        isc_boolean_t build_nsec3 = ISC_FALSE;
        isc_boolean_t first;
        isc_result_t result;
-       isc_stdtime_t now, inception, soaexpire, expire, stop;
+       isc_stdtime_t now, inception, soaexpire, expire;
        isc_uint32_t jitter;
        unsigned int i, j;
        unsigned int nkeys = 0;
        isc_uint32_t nodes;
-       isc_boolean_t was_ksk;
 
        dns_rdataset_init(&rdataset);
        dns_fixedname_init(&fixed);
@@ -6524,7 +6525,6 @@ zone_sign(dns_zone_t *zone) {
         */
        isc_random_get(&jitter);
        expire = soaexpire - jitter % 3600;
-       stop = now + 5;
 
        /*
         * We keep pulling nodes off each iterator in turn until
@@ -6569,8 +6569,6 @@ zone_sign(dns_zone_t *zone) {
 
                delegation = ISC_FALSE;
 
-               was_ksk = ISC_FALSE;
-
                if (first && signing->delete) {
                        /*
                         * Remove the key we are deleting from consideration.
@@ -6829,9 +6827,7 @@ zone_sign(dns_zone_t *zone) {
        /*
         * Write changes to journal file.
         */
-       result = zone_journal(zone, &sig_diff, "zone_sign");
-       if (result != ISC_R_SUCCESS)
-               goto failure;
+       CHECK(zone_journal(zone, &sig_diff, "zone_sign"));
 
  pauseall:
        /*
@@ -7013,6 +7009,7 @@ refresh_time(dns_keyfetch_t *kfetch, isc_boolean_t retry) {
 
        dns_rdataset_current(rdset, &sigrr);
        result = dns_rdata_tostruct(&sigrr, &sig, NULL);
+       RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
        if (!retry) {
                t = sig.originalttl / 2;
@@ -7952,7 +7949,7 @@ dns_zone_refresh(dns_zone_t *zone) {
        isc_interval_set(&i, isc_random_jitter(zone->retry, zone->retry / 4),
                         0);
        result = isc_time_nowplusinterval(&zone->refreshtime, &i);
-       if (result |= ISC_R_SUCCESS)
+       if (result != ISC_R_SUCCESS)
                dns_zone_log(zone, ISC_LOG_WARNING,
                             "isc_time_nowplusinterval() failed: %s",
                             dns_result_totext(result));
@@ -9487,6 +9484,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
        } else
                zone_debuglog(zone, me, 1, "serial: new %u, old not loaded",
                              serial);
+
        if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED) ||
            DNS_ZONE_FLAG(zone, DNS_ZONEFLG_FORCEXFER) ||
            isc_serial_gt(serial, oldserial)) {
@@ -10061,6 +10059,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
         * XXX Optimisation: Create message when zone is setup and reuse.
         */
        result = create_query(zone, dns_rdatatype_ns, &message);
+       INSIST(result == ISC_R_SUCCESS);
 
        INSIST(zone->masterscnt > 0);
        INSIST(zone->curmaster < zone->masterscnt);
@@ -10134,6 +10133,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
                break;
        default:
                result = ISC_R_NOTIMPLEMENTED;
+               POST(result);
                goto cleanup;
        }
        timeout = 15;
index 040d3824008089d8d18dee4b40faa48653f38439..4b5caa683fe034302d8f4cdb7426fe5384f91b52 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsprobe.c,v 1.7 2010/01/07 23:48:54 tbox Exp $ */
+/* $Id: nsprobe.c,v 1.7.180.1 2011/03/11 06:47:07 marka Exp $ */
 
 #include <config.h>
 
@@ -787,6 +787,7 @@ resolve_nsaddress(isc_task_t *task, isc_event_t *event) {
                                        fprintf(stderr, "resolve_nsaddress: "
                                                "mem_get failed");
                                        result = ISC_R_NOMEMORY;
+                                       POST(result);
                                        goto cleanup;
                                }
                                isc_sockaddr_fromin(&server->address,
@@ -923,6 +924,7 @@ resolve_ns(isc_task_t *task, isc_event_t *event) {
                                        fprintf(stderr,
                                                "resolve_ns: mem_get failed");
                                        result = ISC_R_NOMEMORY;
+                                       POST(result);
                                        /*
                                         * XXX: should we continue with the
                                         * available servers anyway?
index 0b674dbd816e2e7734495a38ad5cbaf167fceada..54ac705bb9bc8d933536e03802409924c62b9047 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: getnameinfo.c,v 1.4 2009/09/02 23:48:02 tbox Exp $ */
+/* $Id: getnameinfo.c,v 1.4.346.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*! \file */
 
@@ -149,12 +149,12 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
 {
        struct afd *afd;
        struct servent *sp;
-       unsigned short port;
+       unsigned short port = 0;
 #ifdef IRS_PLATFORM_HAVESALEN
        size_t len;
 #endif
        int family, i;
-       const void *addr;
+       const void *addr = NULL;
        char *p;
 #if 0
        unsigned long v4a;
@@ -199,8 +199,6 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
                break;
 
        default:
-               port = 0;
-               addr = NULL;
                INSIST(0);
        }
        proto = (flags & NI_DGRAM) ? "udp" : "tcp";
index f3181a30d23314c80f64a363533a607a2d575405..4b7d6bdc3cdae15a37a7bd957cf757d9818fc8b7 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resconf.c,v 1.3 2009/09/02 23:48:02 tbox Exp $ */
+/* $Id: resconf.c,v 1.3.346.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*! \file resconf.c */
 
@@ -517,6 +517,7 @@ irs_resconf_load(isc_mem_t *mctx, const char *filename, irs_resconf_t **confp)
                stopchar = getword(fp, word, sizeof(word));
                if (stopchar == EOF) {
                        rval = ISC_R_SUCCESS;
+                       POST(rval);
                        break;
                }
 
index be30d52f36a6e17c67e2c8c30db2022c848f887a..9b6baf417aecfb0baad00e53ad3ea057759e0a13 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: httpd.c,v 1.20.40.2 2011/02/28 01:20:03 tbox Exp $ */
+/* $Id: httpd.c,v 1.20.40.3 2011/03/11 06:47:07 marka Exp $ */
 
 /*! \file */
 
@@ -315,7 +315,7 @@ isc_httpdmgr_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
        isc_task_detach(&httpd->task);
        isc_socket_detach(&httpd->sock);
        isc_mem_detach(&httpd->mctx);
-       isc_mutex_destroy(&httpd->lock);
+       (void)isc_mutex_destroy(&httpd->lock);
        isc_mem_put(mctx, httpd, sizeof(isc_httpdmgr_t));
        return (result);
 }
@@ -364,7 +364,7 @@ httpdmgr_destroy(isc_httpdmgr_t *httpdmgr)
        }
 
        UNLOCK(&httpdmgr->lock);
-       isc_mutex_destroy(&httpdmgr->lock);
+       (void)isc_mutex_destroy(&httpdmgr->lock);
 
        if (httpdmgr->ondestroy != NULL)
                (httpdmgr->ondestroy)(httpdmgr->cb_arg);
@@ -586,6 +586,8 @@ isc_httpd_accept(isc_task_t *task, isc_event_t *ev)
        r.length = HTTP_RECVLEN - 1;
        result = isc_socket_recv(httpd->sock, &r, 1, task, isc_httpd_recvdone,
                                 httpd);
+       /* FIXME!!! */
+       POST(result);
        NOTICE("accept queued recv on socket");
 
  requeue:
@@ -683,8 +685,9 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
                }
                r.base = (unsigned char *)httpd->recvbuf + httpd->recvlen;
                r.length = HTTP_RECVLEN - httpd->recvlen - 1;
-               result = isc_socket_recv(httpd->sock, &r, 1, task,
-                                        isc_httpd_recvdone, httpd);
+               /* check return code? */
+               (void)isc_socket_recv(httpd->sock, &r, 1, task,
+                                     isc_httpd_recvdone, httpd);
                goto out;
        } else if (result != ISC_R_SUCCESS) {
                destroy_client(&httpd);
@@ -722,14 +725,14 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
                                     &httpd->mimetype, &httpd->bodybuffer,
                                     &httpd->freecb, &httpd->freecb_arg);
        if (result != ISC_R_SUCCESS) {
-           result = httpd->mgr->render_500(httpd->url, httpd->querystring,
-                                           NULL,
-                                           &httpd->retcode,
-                                           &httpd->retmsg,
-                                           &httpd->mimetype,
-                                           &httpd->bodybuffer,
-                                           &httpd->freecb,
-                                           &httpd->freecb_arg);
+               result = httpd->mgr->render_500(httpd->url, httpd->querystring,
+                                               NULL, &httpd->retcode,
+                                               &httpd->retmsg,
+                                               &httpd->mimetype,
+                                               &httpd->bodybuffer,
+                                               &httpd->freecb,
+                                               &httpd->freecb_arg);
+               RUNTIME_CHECK(result == ISC_R_SUCCESS);
        }
 
        isc_httpd_response(httpd);
@@ -753,8 +756,9 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
        if (isc_buffer_length(&httpd->bodybuffer) > 0)
                ISC_LIST_APPEND(httpd->bufflist, &httpd->bodybuffer, link);
 
-       result = isc_socket_sendv(httpd->sock, &httpd->bufflist, task,
-                                 isc_httpd_senddone, httpd);
+       /* check return code? */
+       (void)isc_socket_sendv(httpd->sock, &httpd->bufflist, task,
+                              isc_httpd_senddone, httpd);
 
  out:
        isc_event_free(&ev);
@@ -912,7 +916,6 @@ isc_httpd_senddone(isc_task_t *task, isc_event_t *ev)
 {
        isc_httpd_t *httpd = ev->ev_arg;
        isc_region_t r;
-       isc_result_t result;
        isc_socketevent_t *sev = (isc_socketevent_t *)ev;
 
        ENTER("senddone");
@@ -963,8 +966,9 @@ isc_httpd_senddone(isc_task_t *task, isc_event_t *ev)
 
        r.base = (unsigned char *)httpd->recvbuf;
        r.length = HTTP_RECVLEN - 1;
-       result = isc_socket_recv(httpd->sock, &r, 1, task, isc_httpd_recvdone,
-                                httpd);
+       /* check return code? */
+       (void)isc_socket_recv(httpd->sock, &r, 1, task,
+                             isc_httpd_recvdone, httpd);
 
 out:
        isc_event_free(&ev);
index 8cffe3e9cca84009458bc05d16a3539ed85fe45b..d3184962e1043d15d07bd909766f365c3bbebe08 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: util.h,v 1.32 2010/01/11 23:48:37 tbox Exp $ */
+/* $Id: util.h,v 1.32.170.1 2011/03/11 06:47:08 marka Exp $ */
 
 #ifndef ISC_UTIL_H
 #define ISC_UTIL_H 1
  */
 #define UNUSED(x)      (void)(x)
 
+/*%
+ * The opposite: silent warnings about stored values which are never read.
+ */
+#define POST(x)        (void)(x)
+
 #define ISC_MAX(a, b)  ((a) > (b) ? (a) : (b))
 #define ISC_MIN(a, b)  ((a) < (b) ? (a) : (b))
 
index 79ca4f2a4008a22454fdd0528146ad91f60fe031..badad4f332283d2c49d1a55e1949e77bd4b82029 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: log.c,v 1.99 2009/02/16 02:01:16 marka Exp $ */
+/* $Id: log.c,v 1.99.404.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*! \file
  * \author  Principal Authors: DCL */
@@ -1342,9 +1342,10 @@ isc_log_open(isc_logchannel_t *channel) {
                    (FILE_MAXSIZE(channel) > 0 &&
                     statbuf.st_size >= FILE_MAXSIZE(channel)))
                        roll = regular_file;
-       } else if (errno == ENOENT)
+       } else if (errno == ENOENT) {
                regular_file = ISC_TRUE;
-       else
+               POST(regular_file);
+       } else
                result = ISC_R_INVALIDFILE;
 
        /*
index b9fe853f9e6e03a17655dcb4d53387dcd18bf517..4ce6df01ad0207da0dbdd17917853f8fbb1a1535 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: netaddr.c,v 1.41.38.2 2011/02/28 01:20:03 tbox Exp $ */
+/* $Id: netaddr.c,v 1.41.38.3 2011/03/11 06:47:07 marka Exp $ */
 
 /*! \file */
 
@@ -69,10 +69,10 @@ isc_boolean_t
 isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
                     unsigned int prefixlen)
 {
-       const unsigned char *pa, *pb;
-       unsigned int ipabytes; /* Length of whole IP address in bytes */
-       unsigned int nbytes;   /* Number of significant whole bytes */
-       unsigned int nbits;    /* Number of significant leftover bits */
+       const unsigned char *pa = NULL, *pb = NULL;
+       unsigned int ipabytes = 0; /* Length of whole IP address in bytes */
+       unsigned int nbytes;       /* Number of significant whole bytes */
+       unsigned int nbits;        /* Number of significant leftover bits */
 
        REQUIRE(a != NULL && b != NULL);
 
@@ -94,8 +94,6 @@ isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
                ipabytes = 16;
                break;
        default:
-               pa = pb = NULL; /* Avoid silly compiler warning. */
-               ipabytes = 0; /* Ditto. */
                return (ISC_FALSE);
        }
 
@@ -215,7 +213,7 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size) {
 isc_result_t
 isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen) {
        static const unsigned char zeros[16];
-       unsigned int nbits, nbytes, ipbytes;
+       unsigned int nbits, nbytes, ipbytes = 0;
        const unsigned char *p;
 
        switch (na->family) {
@@ -232,7 +230,6 @@ isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen) {
                        return (ISC_R_RANGE);
                break;
        default:
-               ipbytes = 0;
                return (ISC_R_NOTIMPLEMENTED);
        }
        nbytes = prefixlen / 8;
@@ -249,7 +246,7 @@ isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen) {
 
 isc_result_t
 isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp) {
-       unsigned int nbits, nbytes, ipbytes, i;
+       unsigned int nbits = 0, nbytes = 0, ipbytes = 0, i;
        const unsigned char *p;
 
        switch (s->family) {
@@ -262,10 +259,8 @@ isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp) {
                ipbytes = 16;
                break;
        default:
-               ipbytes = 0;
                return (ISC_R_NOTIMPLEMENTED);
        }
-       nbytes = nbits = 0;
        for (i = 0; i < ipbytes; i++) {
                if (p[i] != 0xFF)
                        break;
index 7015aa9370b475759e57a2849973b51509bac92d..383eb23957a0fd8ff3df577efb8888867f5b8348 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: radix.c,v 1.23 2009/01/18 23:48:14 tbox Exp $ */
+/* $Id: radix.c,v 1.23.426.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*
  * This source was adapted from MRT's RCS Ids:
@@ -275,7 +275,7 @@ isc_radix_search(isc_radix_tree_t *radix, isc_radix_node_t **target,
        if (node && node->prefix)
                stack[cnt++] = node;
 
-       while (--cnt >= 0) {
+       while (cnt-- > 0) {
                node = stack[cnt];
 
                if (_comp_with_mask(isc_prefix_tochar(node->prefix),
index 315fd25f862f7b2c81e8240d50753202e12fa14d..3241d744c6920a2f9bb0fa06c4c52a605dd1fed4 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rwlock.c,v 1.46 2009/01/18 23:48:14 tbox Exp $ */
+/* $Id: rwlock.c,v 1.46.426.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*! \file */
 
@@ -261,6 +261,7 @@ isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
                }
 
                cntflag = isc_atomic_xadd(&rwl->cnt_and_flag, READER_INCR);
+               POST(cntflag);
                while (1) {
                        if ((rwl->cnt_and_flag & WRITER_ACTIVE) == 0)
                                break;
index f2dd19c6042dd50821e7ee058e978d74a9dadd00..49c6edf5eca7a67635da5d930ec01f89a84738f5 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: sha1.c,v 1.20 2009/02/06 23:47:42 tbox Exp $ */
+/* $Id: sha1.c,v 1.20.408.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*     $NetBSD: sha1.c,v 1.5 2000/01/22 22:19:14 mycroft Exp $ */
 /*     $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $       */
@@ -256,6 +256,8 @@ transform(isc_uint32_t state[5], const unsigned char buffer[64]) {
 
        /* Wipe variables */
        a = b = c = d = e = 0;
+       /* Avoid compiler warnings */
+       POST(a); POST(b); POST(c); POST(d); POST(e);
 }
 
 
index d42ad584ba61b90d80f114867761683dc833fd0b..3f6501c357851ea7b5c0eb798d0d64c1e164c2d3 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: sha2.c,v 1.18 2009/10/22 02:21:31 each Exp $ */
+/* $Id: sha2.c,v 1.18.280.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*     $FreeBSD: src/sys/crypto/sha2/sha2.c,v 1.2.2.2 2002/03/05 08:36:47 ume Exp $    */
 /*     $KAME: sha2.c,v 1.8 2001/11/08 01:07:52 itojun Exp $    */
@@ -692,6 +692,9 @@ void isc_sha256_transform(isc_sha256_t *context, const isc_uint32_t* data) {
 
        /* Clean up */
        a = b = c = d = e = f = g = h = T1 = 0;
+        /* Avoid compiler warnings */
+        POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+       POST(g); POST(h); POST(T1);
 }
 
 #else /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -772,7 +775,10 @@ isc_sha256_transform(isc_sha256_t *context, const isc_uint32_t* data) {
        context->state[7] += h;
 
        /* Clean up */
-       a = b = c = d = e = f = g = h = T1 = T2 = 0;
+        a = b = c = d = e = f = g = h = T1 = T2 = 0;
+        /* Avoid compiler warnings */
+        POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+       POST(g); POST(h); POST(T1); POST(T2);
 }
 
 #endif /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -809,6 +815,8 @@ isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
                        context->bitcount += len << 3;
                        /* Clean up: */
                        usedspace = freespace = 0;
+                       /* Avoid compiler warnings: */
+                       POST(usedspace); POST(freespace);
                        return;
                }
        }
@@ -827,6 +835,8 @@ isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
        }
        /* Clean up: */
        usedspace = freespace = 0;
+       /* Avoid compiler warnings: */
+       POST(usedspace); POST(freespace);
 }
 
 void
@@ -897,6 +907,7 @@ isc_sha256_final(isc_uint8_t digest[], isc_sha256_t *context) {
        /* Clean up state data: */
        memset(context, 0, sizeof(context));
        usedspace = 0;
+       POST(usedspace);
 }
 
 /*** SHA-512: *********************************************************/
@@ -1003,6 +1014,9 @@ void isc_sha512_transform(isc_sha512_t *context, const isc_uint64_t* data) {
 
        /* Clean up */
        a = b = c = d = e = f = g = h = T1 = 0;
+        /* Avoid compiler warnings */
+        POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+       POST(g); POST(h); POST(T1);
 }
 
 #else /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -1082,6 +1096,9 @@ isc_sha512_transform(isc_sha512_t *context, const isc_uint64_t* data) {
 
        /* Clean up */
        a = b = c = d = e = f = g = h = T1 = T2 = 0;
+        /* Avoid compiler warnings */
+        POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+       POST(g); POST(h); POST(T1); POST(T2);
 }
 
 #endif /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -1117,6 +1134,8 @@ void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t le
                        ADDINC128(context->bitcount, len << 3);
                        /* Clean up: */
                        usedspace = freespace = 0;
+                       /* Avoid compiler warnings: */
+                       POST(usedspace); POST(freespace);
                        return;
                }
        }
@@ -1135,6 +1154,8 @@ void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t le
        }
        /* Clean up: */
        usedspace = freespace = 0;
+       /* Avoid compiler warnings: */
+       POST(usedspace); POST(freespace);
 }
 
 void isc_sha512_last(isc_sha512_t *context) {
index b9c43e7bb150d03ca488bea71daac2a50a02426e..e62a85487b49d2ebb0e3fc773d22a36a40f686e0 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: string.c,v 1.20 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: string.c,v 1.20.814.1 2011/03/11 06:47:07 marka Exp $ */
 
 /*! \file */
 
@@ -165,14 +165,15 @@ isc_string_printf(char *target, size_t size, const char *format, ...) {
 }
 
 void
-isc_string_printf_truncate(char *target, size_t size, const char *format, ...) {
+isc_string_printf_truncate(char *target, size_t size, const char *format, ...)
+{
        va_list args;
-       size_t n;
 
        REQUIRE(size > 0U);
 
        va_start(args, format);
-       n = vsnprintf(target, size, format, args);
+       /* check return code? */
+       (void)vsnprintf(target, size, format, args);
        va_end(args);
 
        ENSURE(strlen(target) < size);
index afc6d66799ab947a5cc29bad29814590a7483d05..e5f335bf806d4296e47820403983b8cc914384d9 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: timer.c,v 1.95.302.2 2011/02/28 01:20:03 tbox Exp $ */
+/* $Id: timer.c,v 1.95.302.3 2011/03/11 06:47:08 marka Exp $ */
 
 /*! \file */
 
@@ -333,7 +333,9 @@ schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
 
 static inline void
 deschedule(isc__timer_t *timer) {
+#ifdef USE_TIMER_THREAD
        isc_boolean_t need_wakeup = ISC_FALSE;
+#endif
        isc__timermgr_t *manager;
 
        /*
@@ -342,8 +344,10 @@ deschedule(isc__timer_t *timer) {
 
        manager = timer->manager;
        if (timer->index > 0) {
+#ifdef USE_TIMER_THREAD
                if (timer->index == 1)
                        need_wakeup = ISC_TRUE;
+#endif
                isc_heap_delete(manager->heap, timer->index);
                timer->index = 0;
                INSIST(manager->nscheduled > 0);
@@ -527,6 +531,7 @@ isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type,
        REQUIRE(VALID_TIMER(timer));
        manager = timer->manager;
        REQUIRE(VALID_MANAGER(manager));
+
        if (expires == NULL)
                expires = isc_time_epoch;
        if (interval == NULL)
@@ -550,8 +555,6 @@ isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type,
                isc_time_settoepoch(&now);
        }
 
-       manager = timer->manager;
-
        LOCK(&manager->lock);
        LOCK(&timer->lock);
 
index 6ddb97bd304b78c9ca3fb55a22f6492901066f48..7c7e7df6ca189582fb9af28fe70bfadcdd20bdfe 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dir.c,v 1.29 2009/02/16 23:48:04 tbox Exp $ */
+/* $Id: dir.c,v 1.29.404.1 2011/03/11 06:47:08 marka Exp $ */
 
 /*! \file
  * \author  Principal Authors: DCL */
@@ -79,7 +79,7 @@ isc_dir_open(isc_dir_t *dir, const char *dirname) {
        if (dir->dirname < p && *(p - 1) != '/')
                *p++ = '/';
        *p++ = '*';
-       *p++ = '\0';
+       *p = '\0';
 
        /*
         * Open stream.
index 3b5f10a770a22a3ffd00b2f15b491edc0c519b8a..bf72c11aa76aa0c462b5ea18c639425f51e2da22 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.333.14.4 2011/02/28 12:51:28 marka Exp $ */
+/* $Id: socket.c,v 1.333.14.5 2011/03/11 06:47:08 marka Exp $ */
 
 /*! \file */
 
@@ -1758,6 +1758,7 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
                } else {
                        isc_buffer_add(buffer, actual_count);
                        actual_count = 0;
+                       POST(actual_count);
                        break;
                }
                buffer = ISC_LIST_NEXT(buffer, link);
@@ -2037,7 +2038,7 @@ allocate_socket(isc__socketmgr_t *manager, isc_sockettype_t type,
         */
        cmsgbuflen = 0;
 #if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
-       cmsgbuflen = cmsg_space(sizeof(struct in6_pktinfo));
+       cmsgbuflen += cmsg_space(sizeof(struct in6_pktinfo));
 #endif
 #if defined(USE_CMSG) && defined(SO_TIMESTAMP)
        cmsgbuflen += cmsg_space(sizeof(struct timeval));
@@ -2051,7 +2052,7 @@ allocate_socket(isc__socketmgr_t *manager, isc_sockettype_t type,
 
        cmsgbuflen = 0;
 #if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
-       cmsgbuflen = cmsg_space(sizeof(struct in6_pktinfo));
+       cmsgbuflen += cmsg_space(sizeof(struct in6_pktinfo));
 #endif
        sock->sendcmsgbuflen = cmsgbuflen;
        if (sock->sendcmsgbuflen != 0U) {
@@ -2756,7 +2757,6 @@ isc__socket_close(isc_socket_t *sock0) {
        isc__socket_t *sock = (isc__socket_t *)sock0;
        int fd;
        isc__socketmgr_t *manager;
-       isc_sockettype_t type;
 
        REQUIRE(VALID_SOCKET(sock));
 
@@ -2776,7 +2776,6 @@ isc__socket_close(isc_socket_t *sock0) {
        INSIST(sock->connect_ev == NULL);
 
        manager = sock->manager;
-       type = sock->type;
        fd = sock->fd;
        sock->fd = -1;
        memset(sock->name, 0, sizeof(sock->name));
index 59428d3ca776b203f7932d0591c7a3f742cf993f..8f18c97776149678d1a06ef416aa1f921818e3c1 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: time.c,v 1.56 2008/02/15 23:46:51 tbox Exp $ */
+/* $Id: time.c,v 1.56.608.1 2011/03/11 06:47:08 marka Exp $ */
 
 /*! \file */
 
@@ -319,7 +319,7 @@ isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2) {
        /*
         * Convert to microseconds.
         */
-       i3 = (i1 - i2) / NS_PER_US;
+       i3 /= NS_PER_US;
 
        return (i3);
 }
index 6ec22846ab1c78a3e833c0d392391a004178c16b..1b50afae3addb87a4d8cf2acc19cff1ef42faf6e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dir.c,v 1.18 2009/01/18 23:48:14 tbox Exp $ */
+/* $Id: dir.c,v 1.18.424.1 2011/03/11 06:47:08 marka Exp $ */
 
 /* Principal Authors: DCL */
 
@@ -85,7 +85,7 @@ isc_dir_open(isc_dir_t *dir, const char *dirname) {
        if (dir->dirname < p && *(p - 1) != '\\' && *(p - 1) != ':')
                *p++ = '\\';
        *p++ = '*';
-       *p++ = '\0';
+       *p = '\0';
 
        /*
         * Open stream.
index c8696c9a6b2679bc58aa7daba31d2238386f7fc0..0e6b8af9494ec3e2d6eb45aa30f0f70d2b6889e3 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: namedconf.c,v 1.131.8.1 2011/02/03 05:50:08 marka Exp $ */
+/* $Id: namedconf.c,v 1.131.8.2 2011/03/11 06:47:08 marka Exp $ */
 
 /*! \file */
 
@@ -2235,7 +2235,8 @@ static cfg_type_t cfg_type_controls_sockaddr = {
  * statement, which takes a single key with or without braces and semicolon.
  */
 static isc_result_t
-parse_server_key_kludge(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
+parse_server_key_kludge(cfg_parser_t *pctx, const cfg_type_t *type,
+                       cfg_obj_t **ret)
 {
        isc_result_t result;
        isc_boolean_t braces = ISC_FALSE;
@@ -2245,7 +2246,7 @@ parse_server_key_kludge(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **
        CHECK(cfg_peektoken(pctx, 0));
        if (pctx->token.type == isc_tokentype_special &&
            pctx->token.value.as_char == '{') {
-               result = cfg_gettoken(pctx, 0);
+               CHECK(cfg_gettoken(pctx, 0));
                braces = ISC_TRUE;
        }
 
index 140915d660a8a18c707a8b1db3549523c7054ffe..da318186c663cdb48a6f2a3edaad4bc825955de8 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: parser.c,v 1.139.14.1 2011/02/21 06:11:14 marka Exp $ */
+/* $Id: parser.c,v 1.139.14.2 2011/03/11 06:47:09 marka Exp $ */
 
 /*! \file */
 
@@ -1904,6 +1904,7 @@ cfg_doc_netaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
                        cfg_print_chars(pctx, " | ", 3);
                cfg_print_chars(pctx, "*", 1);
                n++;
+               POST(n);
        }
        if (*flagp != CFG_ADDR_V4OK && *flagp != CFG_ADDR_V6OK)
                cfg_print_chars(pctx, " )", 2);
@@ -1943,7 +1944,7 @@ cfg_parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type,
        cfg_obj_t *obj = NULL;
        isc_result_t result;
        isc_netaddr_t netaddr;
-       unsigned int addrlen, prefixlen;
+       unsigned int addrlen = 0, prefixlen;
        UNUSED(type);
 
        CHECK(cfg_parse_rawaddr(pctx, CFG_ADDR_V4OK | CFG_ADDR_V4PREFIXOK |
@@ -1956,7 +1957,6 @@ cfg_parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type,
                addrlen = 128;
                break;
        default:
-               addrlen = 0;
                INSIST(0);
                break;
        }
@@ -2095,6 +2095,7 @@ cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
                        cfg_print_chars(pctx, " | ", 3);
                cfg_print_chars(pctx, "*", 1);
                n++;
+               POST(n);
        }
        cfg_print_chars(pctx, " ) ", 3);
        if (*flagp & CFG_ADDR_WILDOK) {
index f8d6e221a2de271a4dcf3119da5c5c06394cb41a..cc7f502a3741cb0a95b2bf465dcd80777d66d07d 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: assert_p.h,v 1.14 2007/06/19 23:47:22 tbox Exp $ */
+/* $Id: assert_p.h,v 1.14.814.1 2011/03/11 06:47:09 marka Exp $ */
 
 #ifndef LWRES_ASSERT_P_H
 #define LWRES_ASSERT_P_H 1
@@ -28,6 +28,7 @@
 #define INSIST(x)              assert(x)
 
 #define UNUSED(x)              ((void)(x))
+#define POST(x)                        ((void)(x))
 
 #define SPACE_OK(b, s)         (LWRES_BUFFER_AVAILABLECOUNT(b) >= (s))
 #define SPACE_REMAINING(b, s)  (LWRES_BUFFER_REMAINING(b) >= (s))
index cf5b892c7f478ea0dad0c1589576f8c41a00eb82..fbfdfa4e57bbbf10d47ad13ef3a3bc8ad4b80136 100644 (file)
@@ -72,7 +72,7 @@
 #if defined(LIBC_SCCS) && !defined(lint)
 static const char sccsid[] = "@(#)herror.c     8.1 (Berkeley) 6/4/93";
 static const char rcsid[] =
-       "$Id: herror.c,v 1.17 2007/06/19 23:47:22 tbox Exp $";
+       "$Id: herror.c,v 1.17.814.1 2011/03/11 06:47:09 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <config.h>
@@ -96,7 +96,7 @@ static const char *h_errlist[] = {
        "No address associated with name",      /*%< 4 NO_ADDRESS */
 };
 
-static int     h_nerr = { sizeof(h_errlist) / sizeof(h_errlist[0]) };
+static int     h_nerr = sizeof(h_errlist) / sizeof(h_errlist[0]);
 
 
 /*!
index ca099b6bdcccb7d24dfef942b760d65dda180697..4ec247703fc191ab80e800bde36f40b41d97f602 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: lwconfig.c,v 1.48 2008/12/17 23:47:58 tbox Exp $ */
+/* $Id: lwconfig.c,v 1.48.436.1 2011/03/11 06:47:09 marka Exp $ */
 
 /*! \file */
 
@@ -589,6 +589,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
                stopchar = getword(fp, word, sizeof(word));
                if (stopchar == EOF) {
                        rval = LWRES_R_SUCCESS;
+                       POST(rval);
                        break;
                }
 
index 5245d29cb31f1dccb4633141a7b14615d92f2778..da2dee1b14a92b02309383e9458bcd711965487f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: print.c,v 1.10 2007/06/19 23:47:22 tbox Exp $ */
+/* $Id: print.c,v 1.10.814.1 2011/03/11 06:47:09 marka Exp $ */
 
 #include <config.h>
 
@@ -115,6 +115,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
                width = precision = 0;
                head = "";
                length = pad = zeropad = 0;
+               POST(length);
 
                do {
                        if (*format == '#') {