Clarify order of operations for compare
This commit is contained in:
parent
7455793d2d
commit
60011ca520
@ -219,7 +219,7 @@ int json_output_file_ip(ipaddr_n_t saddr, ipaddr_n_t daddr,
|
|||||||
gettimeofday(&t, NULL);
|
gettimeofday(&t, NULL);
|
||||||
json_output_file_store_tv(obj, &t);
|
json_output_file_store_tv(obj, &t);
|
||||||
|
|
||||||
if ((ip_hdr->protocol == IPPROTO_UDP || ip_hdr->protocol == IPPROTO_ICMP) && buflen - data_offset > 0)
|
if ((ip_hdr->protocol == IPPROTO_UDP || ip_hdr->protocol == IPPROTO_ICMP) && (buflen - data_offset) > 0)
|
||||||
json_output_file_store_data(obj, packet + data_offset, buflen - data_offset);
|
json_output_file_store_data(obj, packet + data_offset, buflen - data_offset);
|
||||||
|
|
||||||
fprintf(file, "%s\n", json_object_to_json_string(obj));
|
fprintf(file, "%s\n", json_object_to_json_string(obj));
|
||||||
|
Loading…
Reference in New Issue
Block a user