delete memset for performance optimization
This commit is contained in:
@@ -691,7 +691,6 @@ int ip_runtime_scan(struct ip_runtime *ip_rt, int thread_id, int ip_type,
|
||||
}
|
||||
|
||||
struct scan_result ip_results[MAX_SCANNER_HIT_ITEM_NUM];
|
||||
memset(ip_results, 0, sizeof(ip_results));
|
||||
|
||||
/* if ip_addr = "0.0.0.0" means any ip */
|
||||
int any_ip_flag = 0;
|
||||
@@ -718,12 +717,10 @@ int ip_runtime_scan(struct ip_runtime *ip_rt, int thread_id, int ip_type,
|
||||
int ret = 0;
|
||||
size_t real_hit_index = 0;
|
||||
long long hit_item_ids[MAX_SCANNER_HIT_ITEM_NUM];
|
||||
memset(hit_item_ids, -1, sizeof(hit_item_ids));
|
||||
|
||||
// any ip, so scan port+proto
|
||||
if (1 == any_ip_flag) {
|
||||
struct interval_result port_results[MAX_SCANNER_HIT_ITEM_NUM];
|
||||
memset(port_results, 0, sizeof(port_results));
|
||||
uint16_t host_port = ntohs(port);
|
||||
int n_hit_port_item = interval_matcher_match(ip_rt->intval_matcher, host_port,
|
||||
port_results, MAX_SCANNER_HIT_ITEM_NUM);
|
||||
|
||||
Reference in New Issue
Block a user