mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Remove some constant-false conditionals and dead code. See #1834
This commit is contained in:
@@ -706,8 +706,6 @@ const char *FPEngine::bpf_filter(std::vector<Target *> &Targets) {
|
|||||||
fatal("ran out of space in dst_hosts");
|
fatal("ran out of space in dst_hosts");
|
||||||
filterlen += len;
|
filterlen += len;
|
||||||
}
|
}
|
||||||
if (len < 0 || len + filterlen >= (int) sizeof(dst_hosts))
|
|
||||||
fatal("ran out of space in dst_hosts");
|
|
||||||
|
|
||||||
len = Snprintf(pcap_filter, sizeof(pcap_filter), "dst host %s and (%s)",
|
len = Snprintf(pcap_filter, sizeof(pcap_filter), "dst host %s and (%s)",
|
||||||
Targets[0]->sourceipstr(), dst_hosts);
|
Targets[0]->sourceipstr(), dst_hosts);
|
||||||
|
|||||||
@@ -70,7 +70,6 @@
|
|||||||
|
|
||||||
|
|
||||||
static gh_hnode_t **hnode_ptr(gh_heap_t *heap, unsigned int index) {
|
static gh_hnode_t **hnode_ptr(gh_heap_t *heap, unsigned int index) {
|
||||||
assert(index >= 0);
|
|
||||||
assert(index <= heap->count);
|
assert(index <= heap->count);
|
||||||
return &(heap->slots[index]);
|
return &(heap->slots[index]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user