silence coverity warnings
(cherry picked from commit45b727f651) (cherry picked from commit53f675154c)
This commit is contained in:
@@ -613,10 +613,11 @@ main(int argc, char *argv[]) {
|
||||
} else if (strstr(s, "!V") == s) {
|
||||
DBI_CHECK(dbi);
|
||||
v = atoi(&s[2]);
|
||||
if (v >= dbi->rcount) {
|
||||
if (v >= dbi->rcount || v < 0) {
|
||||
printf("unknown open version %d\n", v);
|
||||
continue;
|
||||
} else if (dbi->rversions[v] == NULL) {
|
||||
}
|
||||
if (dbi->rversions[v] == NULL) {
|
||||
printf("version %d is not open\n", v);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -174,9 +174,13 @@ main(int argc, char *argv[]) {
|
||||
|
||||
RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS);
|
||||
|
||||
if (argc > 1)
|
||||
if (argc > 1) {
|
||||
workers = atoi(argv[1]);
|
||||
else
|
||||
if (workers < 1)
|
||||
workers = 1;
|
||||
if (workers > 8192)
|
||||
workers = 8192;
|
||||
} else
|
||||
workers = 2;
|
||||
printf("%d workers\n", workers);
|
||||
|
||||
|
||||
@@ -263,9 +263,13 @@ main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
int pf;
|
||||
|
||||
if (argc > 1)
|
||||
if (argc > 1) {
|
||||
workers = atoi(argv[1]);
|
||||
else
|
||||
if (workers < 1)
|
||||
workers = 1;
|
||||
if (workers > 8192)
|
||||
workers = 8192;
|
||||
} else
|
||||
workers = 2;
|
||||
printf("%d workers\n", workers);
|
||||
|
||||
|
||||
@@ -69,9 +69,13 @@ main(int argc, char *argv[]) {
|
||||
isc_timer_t *ti1, *ti2;
|
||||
struct isc_interval interval;
|
||||
|
||||
if (argc > 1)
|
||||
if (argc > 1) {
|
||||
workers = atoi(argv[1]);
|
||||
else
|
||||
if (workers < 1)
|
||||
workers = 1;
|
||||
if (workers > 8192)
|
||||
workers = 8192;
|
||||
} else
|
||||
workers = 2;
|
||||
printf("%d workers\n", workers);
|
||||
|
||||
|
||||
@@ -102,9 +102,13 @@ main(int argc, char *argv[]) {
|
||||
isc_time_t expires, now;
|
||||
isc_interval_t interval;
|
||||
|
||||
if (argc > 1)
|
||||
if (argc > 1) {
|
||||
workers = atoi(argv[1]);
|
||||
else
|
||||
if (workers < 1)
|
||||
workers = 1;
|
||||
if (workers > 8192)
|
||||
workers = 8192;
|
||||
} else
|
||||
workers = 2;
|
||||
printf("%d workers\n", workers);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user