mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-30 03:39:44 +02:00
- in testcode, free async ids, initialise array, and check for null
pointer during test of the test. And use exit for return to note irregular program stop. git-svn-id: file:///svn/unbound/trunk@4897 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
+4
-3
@@ -532,6 +532,7 @@ qlist_add_line(struct perfinfo* info, char* line, int no)
|
||||
printf("error parsing query %d: %s\n", no, line);
|
||||
exit(1);
|
||||
}
|
||||
log_assert(info->buf->_data);
|
||||
sldns_buffer_write_u16_at(info->buf, 0, (uint16_t)info->qlist_size);
|
||||
if(info->qlist_size + 1 > info->qlist_capacity) {
|
||||
qlist_grow_capacity(info);
|
||||
@@ -610,7 +611,7 @@ int main(int argc, char* argv[])
|
||||
case 'd':
|
||||
if(atoi(optarg)==0 && strcmp(optarg, "0")!=0) {
|
||||
printf("-d not a number %s", optarg);
|
||||
return 1;
|
||||
exit(1);
|
||||
}
|
||||
info.duration = atoi(optarg);
|
||||
break;
|
||||
@@ -635,11 +636,11 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
if(!extstrtoaddr(argv[0], &info.dest, &info.destlen)) {
|
||||
printf("Could not parse ip: %s\n", argv[0]);
|
||||
return 1;
|
||||
exit(1);
|
||||
}
|
||||
if(info.qlist_size == 0) {
|
||||
printf("No queries to make, use -f or -a.\n");
|
||||
return 1;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* do the performance test */
|
||||
|
||||
Reference in New Issue
Block a user