mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
[master] silence coverity warnings
- remove dead code in server.c - initialize a struct tm.c
This commit is contained in:
@@ -1399,10 +1399,8 @@ check_dbtype(dns_zone_t *zone, unsigned int dbtypec, const char **dbargv,
|
|||||||
* Check that all the arguments match.
|
* Check that all the arguments match.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < dbtypec; i++)
|
for (i = 0; i < dbtypec; i++)
|
||||||
if (argv[i] == NULL || strcmp(argv[i], dbargv[i]) != 0) {
|
if (argv[i] == NULL || strcmp(argv[i], dbargv[i]) != 0)
|
||||||
CHECK(ISC_R_FAILURE);
|
CHECK(ISC_R_FAILURE);
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check that there are not extra arguments.
|
* Check that there are not extra arguments.
|
||||||
|
@@ -823,7 +823,6 @@ t_dns_name_fullcompare(void) {
|
|||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
line = 0;
|
line = 0;
|
||||||
while ((p = t_fgetbs(fp)) != NULL) {
|
while ((p = t_fgetbs(fp)) != NULL) {
|
||||||
|
|
||||||
++line;
|
++line;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -851,8 +850,8 @@ t_dns_name_fullcompare(void) {
|
|||||||
else if (!strcmp(Tokens[2], "commonancestor"))
|
else if (!strcmp(Tokens[2], "commonancestor"))
|
||||||
reln = dns_namereln_commonancestor;
|
reln = dns_namereln_commonancestor;
|
||||||
else {
|
else {
|
||||||
t_info("bad format at line %d\n",
|
t_info("bad format at line %d\n", line);
|
||||||
line);
|
(void)free(p);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
result = test_dns_name_fullcompare(
|
result = test_dns_name_fullcompare(
|
||||||
|
@@ -147,6 +147,12 @@ isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) {
|
|||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
int alt_format, i, split_year = 0;
|
int alt_format, i, split_year = 0;
|
||||||
|
|
||||||
|
REQUIRE(buf != NULL);
|
||||||
|
REQUIRE(fmt != NULL);
|
||||||
|
REQUIRE(tm != NULL);
|
||||||
|
|
||||||
|
memset(tm, 0, sizeof(struct tm));
|
||||||
|
|
||||||
bp = buf;
|
bp = buf;
|
||||||
|
|
||||||
while ((c = *fmt) != '\0') {
|
while ((c = *fmt) != '\0') {
|
||||||
|
Reference in New Issue
Block a user