+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]
* 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 */
if (obj != NULL)
maps[i++] = obj;
}
- maps[i++] = NULL;
+ maps[i] = NULL;
cfg_map_get(zoptions, "type", &typeobj);
if (typeobj == NULL)
* 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 */
argc -= isc_commandline_index;
argv += isc_commandline_index;
+ POST(argv);
if (self_domain != NULL && zone != NULL)
usage(1); /* -s and -z cannot coexist */
* 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 */
argc -= isc_commandline_index;
argv += isc_commandline_index;
+ POST(argv);
if (argc > 0)
usage(1);
* 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 */
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");
(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");
* 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
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);
* 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 */
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",
* 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 */
{
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);
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);
* 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 */
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);
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)
* 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 */
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];
#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]++;
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;
}
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,
* 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 */
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);
* 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 */
}
}
*ifpret = ifp;
- return (ISC_R_SUCCESS);
+ return (result);
cleanup_interface:
ISC_LIST_UNLINK(ifp->mgr->interfaces, ifp, link);
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))
* 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 */
argc -= isc_commandline_index;
argv += isc_commandline_index;
+ POST(argv);
if (argc > 0) {
usage();
* 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 */
need_addname = ISC_FALSE;
zone = NULL;
needadditionalcache = ISC_FALSE;
+ POST(needadditionalcache);
additionaltype = dns_rdatasetadditional_fromauth;
dns_name_init(&cfname, NULL);
* 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 |
(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)
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);
}
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);
goto db_find;
}
- result = DNS_R_NXRRSET;
-
/*
* Look for a NSEC3 record if we don't have a NSEC record.
*/
/*
* 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
* 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 */
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);
sep = "";
viewname = "";
forview = "";
+ POST(forview);
}
/*
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;
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"
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.
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;
/*
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);
"could not open statistics dump file", server->statsfile);
result = ns_stats_dump(server, fp);
- CHECK(result);
cleanup:
if (fp != NULL)
fprintf(dctx->fp, "; %s\n",
dns_result_totext(result));
result = ISC_R_SUCCESS;
+ POST(result);
goto nextzone;
}
if (result != ISC_R_SUCCESS)
* 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 */
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;
* 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>
* 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));
* 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 $ */
/*% */
/* 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;
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);
/* 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,
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);
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));
}
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
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"),
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;
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) {
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;
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));
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);
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") &&
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));
}
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;
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) {
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;
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;
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;
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;
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));
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;
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;
* 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 */
}
check_result(result, "dns_request_getresponse");
section = DNS_SECTION_ANSWER;
+ POST(section);
if (debugging)
show_message(stderr, rcvmsg, "Reply from SOA query:");
* 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>
isc_result_t exp_load_result;
isc_result_t exp_find_result;
- result = T_UNRESOLVED;
db = NULL;
mctx = NULL;
ectx = NULL;
isc_buffer_t origin_buffer;
dns_fixedname_t dns_origin;
- result = T_UNRESOLVED;
-
db = NULL;
mctx = NULL;
ectx = NULL;
dns_dbversion_t *cversionp;
dns_dbversion_t *nversionp;
- result = T_UNRESOLVED;
-
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
dns_dbversion_t *nversionp;
dns_rdatalist_t rdatalist;
- result = T_UNRESOLVED;
-
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
existing_type = T_ARG(8);
nfails = 0;
- result = T_UNRESOLVED;
db = NULL;
mctx = NULL;
ectx = NULL;
existing_type = T_ARG(8);
nfails = 0;
- result = T_UNRESOLVED;
db = NULL;
mctx = NULL;
ectx = NULL;
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.
db = NULL;
mctx = NULL;
ectx = NULL;
- result = T_UNRESOLVED;
t_info("testing using file %s and name %s\n", filename, find_name);
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);
model = T_ARG(4);
newname = T_ARG(5);
- result = T_UNRESOLVED;
db = NULL;
mctx = NULL;
ectx = NULL;
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);
dns_rdatatype_t rdatatype;
dns_dbversion_t *cversionp;
- result = T_UNRESOLVED;
-
dbfile = T_ARG(0);
dbtype = T_ARG(1);
dborigin = T_ARG(2);
* 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>
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
* 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>
int c;
int len;
int cnt;
- unsigned int val;
unsigned char *p;
FILE *fp;
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;
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);
isc_result_t dns_result;
dns_namereln_t dns_namereln;
- result = T_UNRESOLVED;
-
t_info("testing %s\n", test_name);
len = strlen(test_name);
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);
* 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>
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) ||
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,
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);
* 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>
T4_nfails = 0;
T4_flag = 0;
- result = T_UNRESOLVED;
event_type = 4;
workers = 2;
T7_sdflag = 0;
T7_eflag = 0;
- result = T_UNRESOLVED;
event_type = 7;
workers = 2;
* 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>
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.
isc_time_t expires;
isc_interval_t interval;
- task = task;
+ UNUSED(task);
++T5_eventcnt;
t_info("t5_tick_event %d\n", T5_eventcnt);
* 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 */
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;
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);
}
}
- 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)
* 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
*
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;
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;
REQUIRE((options & DNS_ADBFIND_ADDRESSMASK) != 0);
result = ISC_R_UNEXPECTED;
+ POST(result);
wanted_addresses = (options & DNS_ADBFIND_ADDRESSMASK);
wanted_fetches = 0;
query_pending = 0;
}
UNLOCK(&adb->namelocks[unlock_bucket]);
bucket = DNS_ADB_INVALIDBUCKET;
+ POST(bucket);
cleanup:
* 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>
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;
mctx = rctx->view->mctx;
- result = ISC_R_SUCCESS;
name = dns_fixedname_name(&rctx->name);
do {
goto done;
}
} else {
+ INSIST(event != NULL);
INSIST(event->fetch == rctx->fetch);
dns_resolver_destroyfetch(&rctx->fetch);
db = event->db;
&rctx->rdataset);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
+ POST(result);
break;
}
}
* implementation).
*/
result = DNS_R_SERVFAIL; /* better code? */
+ POST(result);
} else {
ISC_LIST_APPEND(rctx->namelist, ansname, link);
ansname = NULL;
reqev = (dns_requestevent_t *)event;
request = reqev->request;
result = eresult = reqev->result;
+ POST(result);
uctx = reqev->ev_arg;
client = uctx->client;
soaquery = uctx->soaquery;
}
section = DNS_SECTION_ANSWER;
+ POST(section);
if (rcvmsg->rcode != dns_rcode_noerror &&
rcvmsg->rcode != dns_rcode_nxdomain) {
* 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 */
dns_rdataset_t rds;
dns_rdataset_t ardataset;
dns_rdataset_t *modified = NULL;
- isc_boolean_t offline;
op = t->op;
type = t->rdata.type;
CHECK(dns_db_findnsec3node(db, name, ISC_TRUE,
&node));
- offline = ISC_FALSE;
while (t != NULL &&
dns_name_equal(&t->name, name) &&
t->op == op &&
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);
}
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;
* 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 */
* 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);
* 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.
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);
}
}
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],
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],
* 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 */
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));
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) {
*/
result = dns_view_addzone(view, zone);
- result = ISC_R_SUCCESS;
-
cleanup:
if (zone != NULL)
dns_zone_detach(&zone);
*/
/*
- * $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 */
/* 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
/* 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);
/* 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);
* 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>
dns_rdataset_disassociate(&rdataset);
dns_db_detachnode(db, &node);
- return (ISC_R_SUCCESS);
+ return (result);
freenode:
dns_db_detachnode(db, &node);
CHECK(journal_fsync(new));
indexend = new->header.end.offset;
+ POST(indexend);
}
/*
* 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 */
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;
}
/*
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;
}
/* Empty read: currently, we do not use dumptime */
dumptime = isc_buffer_getuint32(&target);
+ POST(dumptime);
lctx->first = ISC_FALSE;
}
isc_buffer_forward(&target, consumed_name);
rdcount -= i;
- i = 0;
goto continue_read;
}
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);
}
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);
* 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 */
buffer, f);
}
dns_rdataset_disassociate(&rdataset);
+ if (result != ISC_R_SUCCESS)
+ return (result);
}
if (result == ISC_R_NOMORE)
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) {
* 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 */
skip_name_search = ISC_FALSE;
skip_type_search = ISC_FALSE;
- free_name = ISC_FALSE;
free_rdataset = ISC_FALSE;
name = isc_mempool_get(msg->namepool);
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)
* 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 */
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;
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.
*/
return (DNS_R_BADLABELTYPE);
}
state = ft_escape;
+ POST(state);
/* FALLTHROUGH */
case ft_escape:
if (!isdigit(c & 0xff)) {
label = origin->ndata;
n1 = origin->length;
nrem -= n1;
+ POST(nrem);
while (n1 > 0) {
n2 = *label++;
INSIST(n2 <= 63); /* no bitstring support */
* 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 */
0, NULL);
if (result == DNS_R_UNCHANGED)
result = ISC_R_SUCCESS;
- RETERR(result);
+
failure:
if (dns_rdataset_isassociated(&rdataset))
dns_rdataset_disassociate(&rdataset);
* 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>
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;
* 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
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();
* 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 */
*/
compared = dns_namereln_none;
last_compared = NULL;
+ order = 0;
}
dns_fixedname_init(&fixedcallbackname);
¤t_name,
&order,
&common_labels);
+ POST(compared);
last_compared = current;
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) {
}
child = root;
+ POST(child);
dns_name_init(&add_name, add_offsets);
NODENAME(node, &add_name);
* 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 */
*/
if (search.need_cleanup) {
node = search.zonecut;
+ INSIST(node != NULL);
lock = &(search.rbtdb->node_locks[node->locknum].lock);
NODE_LOCK(lock, isc_rwlocktype_read);
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,
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) {
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);
*/
if (search.need_cleanup) {
node = search.zonecut;
+ INSIST(node != NULL);
lock = &(search.rbtdb->node_locks[node->locknum].lock);
NODE_LOCK(lock, isc_rwlocktype_read);
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);
* 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 */
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);
* 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 */
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;
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;
* 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 */
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);
/*
* 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 */
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;
}
res = fctx->res;
- stdoptions = 0; /* Keep compiler happy. */
/*
* Forwarders.
sigrdataset, 0,
NULL);
dns_db_detachnode(fctx->cache, &nsnode);
+ if (result != ISC_R_SUCCESS)
+ continue;
}
result = dns_message_nextname(fctx->rmessage,
DNS_SECTION_AUTHORITY);
res = fctx->res;
need_validation = ISC_FALSE;
+ POST(need_validation);
secure_domain = ISC_FALSE;
have_answer = ISC_FALSE;
eresult = ISC_R_SUCCESS;
res = fctx->res;
need_validation = ISC_FALSE;
+ POST(need_validation);
secure_domain = ISC_FALSE;
eresult = ISC_R_SUCCESS;
name = &fctx->name;
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
}
found = ISC_TRUE;
want_chaining = ISC_TRUE;
+ POST(want_chaining);
aflag = DNS_RDATASETATTR_ANSWER;
result = dname_target(fctx, rdataset,
qname, name,
* try to continue.
*/
want_chaining = ISC_FALSE;
+ POST(want_chaining);
} else if (result != ISC_R_SUCCESS)
return (result);
else
unsigned int version;
resend = ISC_TRUE;
+ INSIST(opt != NULL);
version = (opt->ttl >> 16) & 0xff;
flags = (version << DNS_FETCHOPT_EDNSVERSIONSHIFT) |
DNS_FETCHOPT_EDNSVERSIONSET;
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);
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);
* 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 */
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);
*/
/*
- * $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>
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));
}
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)
tkeyout->expire = expire;
} else {
tkeyout->inception = tsigkey->inception;
- tkeyout->expire = tkeyout->expire;
+ tkeyout->expire = tsigkey->expire;
dns_tsigkey_detach(&tsigkey);
}
* 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 */
hours = src % 24; src /= 24;
days = src % 7; src /= 7;
weeks = src; src = 0;
+ POST(src);
x = 0;
if (weeks != 0) {
* 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>
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))
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;
devent = (dns_validatorevent_t *)event;
rdataset = devent->rdataset;
- sigrdataset = devent->sigrdataset;
val = devent->ev_arg;
result = devent->result;
dns_validator_destroy(&val->subvalidator);
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.
}
if (result != ISC_R_NOMORE)
result = ISC_R_SUCCESS;
+ POST(result);
if (dns_name_countlabels(zonename) == 0)
return (ISC_R_SUCCESS);
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);
(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);
* 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 */
{
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;
db = NULL;
zone = NULL;
use_zone = ISC_FALSE;
- is_staticstub_zone = ISC_FALSE;
try_hints = ISC_FALSE;
zfname = NULL;
*/
#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
if (result == DNS_R_PARTIALMATCH) {
dns_zone_detach(zp);
result = ISC_R_NOTFOUND;
+ POST(result);
}
if (zone2 != NULL) {
* 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 */
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:
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);
* 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 */
dns_rdataset_disassociate(&aaaa);
return (answer);
}
- } else
- tresult = result;
+ }
dns_name_format(owner, ownerbuf, sizeof ownerbuf);
dns_name_format(name, namebuf, sizeof namebuf);
}
/* 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);
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;
*/
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);
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) {
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)) {
}
/* 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);
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);
*/
isc_random_get(&jitter);
expire = soaexpire - jitter % 3600;
- stop = now + 5;
/*
* We keep pulling nodes off each iterator in turn until
delegation = ISC_FALSE;
- was_ksk = ISC_FALSE;
-
if (first && signing->delete) {
/*
* Remove the key we are deleting from consideration.
/*
* 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:
/*
dns_rdataset_current(rdset, &sigrr);
result = dns_rdata_tostruct(&sigrr, &sig, NULL);
+ RUNTIME_CHECK(result == ISC_R_SUCCESS);
if (!retry) {
t = sig.originalttl / 2;
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));
} 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)) {
* 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);
break;
default:
result = ISC_R_NOTIMPLEMENTED;
+ POST(result);
goto cleanup;
}
timeout = 15;
* 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>
fprintf(stderr, "resolve_nsaddress: "
"mem_get failed");
result = ISC_R_NOMEMORY;
+ POST(result);
goto cleanup;
}
isc_sockaddr_fromin(&server->address,
fprintf(stderr,
"resolve_ns: mem_get failed");
result = ISC_R_NOMEMORY;
+ POST(result);
/*
* XXX: should we continue with the
* available servers anyway?
* 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 */
{
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;
break;
default:
- port = 0;
- addr = NULL;
INSIST(0);
}
proto = (flags & NI_DGRAM) ? "udp" : "tcp";
* 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 */
stopchar = getword(fp, word, sizeof(word));
if (stopchar == EOF) {
rval = ISC_R_SUCCESS;
+ POST(rval);
break;
}
* 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 */
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);
}
}
UNLOCK(&httpdmgr->lock);
- isc_mutex_destroy(&httpdmgr->lock);
+ (void)isc_mutex_destroy(&httpdmgr->lock);
if (httpdmgr->ondestroy != NULL)
(httpdmgr->ondestroy)(httpdmgr->cb_arg);
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:
}
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);
&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);
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);
{
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");
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);
* 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))
* 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 */
(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;
/*
* 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 */
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);
ipabytes = 16;
break;
default:
- pa = pb = NULL; /* Avoid silly compiler warning. */
- ipabytes = 0; /* Ditto. */
return (ISC_FALSE);
}
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) {
return (ISC_R_RANGE);
break;
default:
- ipbytes = 0;
return (ISC_R_NOTIMPLEMENTED);
}
nbytes = prefixlen / 8;
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) {
ipbytes = 16;
break;
default:
- ipbytes = 0;
return (ISC_R_NOTIMPLEMENTED);
}
- nbytes = nbits = 0;
for (i = 0; i < ipbytes; i++) {
if (p[i] != 0xFF)
break;
* 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:
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),
* 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 */
}
cntflag = isc_atomic_xadd(&rwl->cnt_and_flag, READER_INCR);
+ POST(cntflag);
while (1) {
if ((rwl->cnt_and_flag & WRITER_ACTIVE) == 0)
break;
* 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 $ */
/* Wipe variables */
a = b = c = d = e = 0;
+ /* Avoid compiler warnings */
+ POST(a); POST(b); POST(c); POST(d); POST(e);
}
* 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 $ */
/* 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 */
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 */
context->bitcount += len << 3;
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
return;
}
}
}
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
}
void
/* Clean up state data: */
memset(context, 0, sizeof(context));
usedspace = 0;
+ POST(usedspace);
}
/*** SHA-512: *********************************************************/
/* 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 */
/* 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 */
ADDINC128(context->bitcount, len << 3);
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
return;
}
}
}
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
}
void isc_sha512_last(isc_sha512_t *context) {
* 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 */
}
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);
* 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 */
static inline void
deschedule(isc__timer_t *timer) {
+#ifdef USE_TIMER_THREAD
isc_boolean_t need_wakeup = ISC_FALSE;
+#endif
isc__timermgr_t *manager;
/*
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);
REQUIRE(VALID_TIMER(timer));
manager = timer->manager;
REQUIRE(VALID_MANAGER(manager));
+
if (expires == NULL)
expires = isc_time_epoch;
if (interval == NULL)
isc_time_settoepoch(&now);
}
- manager = timer->manager;
-
LOCK(&manager->lock);
LOCK(&timer->lock);
* 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 */
if (dir->dirname < p && *(p - 1) != '/')
*p++ = '/';
*p++ = '*';
- *p++ = '\0';
+ *p = '\0';
/*
* Open stream.
* 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 */
} else {
isc_buffer_add(buffer, actual_count);
actual_count = 0;
+ POST(actual_count);
break;
}
buffer = ISC_LIST_NEXT(buffer, link);
*/
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));
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) {
isc__socket_t *sock = (isc__socket_t *)sock0;
int fd;
isc__socketmgr_t *manager;
- isc_sockettype_t type;
REQUIRE(VALID_SOCKET(sock));
INSIST(sock->connect_ev == NULL);
manager = sock->manager;
- type = sock->type;
fd = sock->fd;
sock->fd = -1;
memset(sock->name, 0, sizeof(sock->name));
* 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 */
/*
* Convert to microseconds.
*/
- i3 = (i1 - i2) / NS_PER_US;
+ i3 /= NS_PER_US;
return (i3);
}
* 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 */
if (dir->dirname < p && *(p - 1) != '\\' && *(p - 1) != ':')
*p++ = '\\';
*p++ = '*';
- *p++ = '\0';
+ *p = '\0';
/*
* Open stream.
* 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 */
* 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;
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;
}
* 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 */
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);
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 |
addrlen = 128;
break;
default:
- addrlen = 0;
INSIST(0);
break;
}
cfg_print_chars(pctx, " | ", 3);
cfg_print_chars(pctx, "*", 1);
n++;
+ POST(n);
}
cfg_print_chars(pctx, " ) ", 3);
if (*flagp & CFG_ADDR_WILDOK) {
* 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
#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))
#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>
"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]);
/*!
* 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 */
stopchar = getword(fp, word, sizeof(word));
if (stopchar == EOF) {
rval = LWRES_R_SUCCESS;
+ POST(rval);
break;
}
* 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>
width = precision = 0;
head = "";
length = pad = zeropad = 0;
+ POST(length);
do {
if (*format == '#') {