mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
silence warnings about unnecessary comparisons
- these are cases where result has been explicitly set, so if (result != ISC_R_SUCCESS) is unnecessary
This commit is contained in:
@@ -9,8 +9,6 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -1340,8 +1338,9 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
if (MANYERRS(lctx, result)) {
|
if (MANYERRS(lctx, result)) {
|
||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
lctx->ttl = 0;
|
lctx->ttl = 0;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
|
}
|
||||||
} else if (!explicit_ttl &&
|
} else if (!explicit_ttl &&
|
||||||
lctx->default_ttl_known) {
|
lctx->default_ttl_known) {
|
||||||
lctx->ttl = lctx->default_ttl;
|
lctx->ttl = lctx->default_ttl;
|
||||||
@@ -1372,9 +1371,10 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
result = DNS_R_SYNTAX;
|
result = DNS_R_SYNTAX;
|
||||||
if (MANYERRS(lctx, result)) {
|
if (MANYERRS(lctx, result)) {
|
||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Normal processing resumes.
|
* Normal processing resumes.
|
||||||
@@ -1544,9 +1544,10 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
LOGIT(result);
|
LOGIT(result);
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find TTL, class and type. Both TTL and class are optional
|
* Find TTL, class and type. Both TTL and class are optional
|
||||||
@@ -1584,9 +1585,10 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
read_till_eol = ISC_TRUE;
|
read_till_eol = ISC_TRUE;
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ictx->origin_changed) {
|
if (ictx->origin_changed) {
|
||||||
char cbuf[DNS_NAME_FORMATSIZE];
|
char cbuf[DNS_NAME_FORMATSIZE];
|
||||||
@@ -1628,9 +1630,10 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
read_till_eol = ISC_TRUE;
|
read_till_eol = ISC_TRUE;
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (rdclass == 0 &&
|
if (rdclass == 0 &&
|
||||||
dns_rdataclass_fromtext(&rdclass,
|
dns_rdataclass_fromtext(&rdclass,
|
||||||
@@ -1646,9 +1649,10 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
read_till_eol = ISC_TRUE;
|
read_till_eol = ISC_TRUE;
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result = dns_rdatatype_fromtext(&type,
|
result = dns_rdatatype_fromtext(&type,
|
||||||
&token.value.as_textregion);
|
&token.value.as_textregion);
|
||||||
@@ -1687,9 +1691,10 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
read_till_eol = ISC_TRUE;
|
read_till_eol = ISC_TRUE;
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (type == dns_rdatatype_ns && ictx->glue == NULL)
|
if (type == dns_rdatatype_ns && ictx->glue == NULL)
|
||||||
current_has_delegation = ISC_TRUE;
|
current_has_delegation = ISC_TRUE;
|
||||||
@@ -1800,8 +1805,9 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
namebuf, desc);
|
namebuf, desc);
|
||||||
if (MANYERRS(lctx, result)) {
|
if (MANYERRS(lctx, result)) {
|
||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
(*callbacks->warn)(callbacks,
|
(*callbacks->warn)(callbacks,
|
||||||
"%s:%lu: %s: %s",
|
"%s:%lu: %s: %s",
|
||||||
@@ -1852,9 +1858,10 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
read_till_eol = ISC_TRUE;
|
read_till_eol = ISC_TRUE;
|
||||||
target = target_ft;
|
target = target_ft;
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else {
|
||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (type == dns_rdatatype_rrsig ||
|
if (type == dns_rdatatype_rrsig ||
|
||||||
type == dns_rdatatype_sig)
|
type == dns_rdatatype_sig)
|
||||||
|
Reference in New Issue
Block a user