From 464e32079c49e11c3d60a21c478b6430a4b716a1 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 23 Mar 2013 19:40:20 +1100 Subject: [PATCH] address warnings --- bin/named/config.c | 4 ++-- bin/named/server.c | 3 ++- lib/dns/zone.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/named/config.c b/bin/named/config.c index e423c00f4f..80347902e3 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -414,7 +414,7 @@ ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list, const cfg_listelt_t *element; isc_sockaddr_t *addrs; in_port_t port; - isc_dscp_t dscp = -1, *dscps; + isc_dscp_t dscp = -1, *dscps = NULL; isc_result_t result; INSIST(addrsp != NULL && *addrsp == NULL); @@ -916,7 +916,7 @@ ns_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp) { maps[i] = NULL; result = ns_config_get(maps, "dscp", &dscpobj); - if (dscpobj == NULL) { + if (result != ISC_R_SUCCESS || dscpobj == NULL) { *dscpp = -1; return (ISC_R_SUCCESS); } diff --git a/bin/named/server.c b/bin/named/server.c index a5c20350d1..18bfef8fe6 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -4372,7 +4372,7 @@ adjust_interfaces(ns_server_t *server, isc_mem_t *mctx) { dns_view_t *view; dns_zone_t *zone, *next; isc_sockaddr_t addr, *addrp; - isc_dscp_t dscp; + isc_dscp_t dscp = -1; result = ns_listenlist_create(mctx, &list); if (result != ISC_R_SUCCESS) @@ -4398,6 +4398,7 @@ adjust_interfaces(ns_server_t *server, isc_mem_t *mctx) { * query ports, and some of them may override an existing * wildcard IPv6 port. */ + /* XXXMPA fix dscp */ result = add_listenelt(mctx, list, &addr, dscp, ISC_TRUE); if (result != ISC_R_SUCCESS) goto fail; diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 2b325753e8..bfebe1a1ba 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -11413,7 +11413,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) { if (result == ISC_R_SUCCESS) have_xfrsource = ISC_TRUE; result = dns_peer_gettransferdscp(peer, &dscp); - if (dscp != -1) + if (result == ISC_R_SUCCESS && dscp != -1) have_xfrdscp = ISC_TRUE; if (zone->view->resolver != NULL) udpsize =