mirror of
https://github.com/nmap/nmap.git
synced 2025-12-11 10:19:03 +00:00
Avoid multiple expansions of TIMEVAL_MSEC_SUBTRACT macro within MAX macro
This commit is contained in:
@@ -242,8 +242,10 @@ int kqueue_loop(struct npool *nsp, int msec_timeout) {
|
||||
nse = next_expirable_event(nsp);
|
||||
if (!nse)
|
||||
event_msecs = -1; /* None of the events specified a timeout */
|
||||
else
|
||||
event_msecs = MAX(0, TIMEVAL_MSEC_SUBTRACT(nse->timeout, nsock_tod));
|
||||
else {
|
||||
event_msecs = TIMEVAL_MSEC_SUBTRACT(nse->timeout, nsock_tod);
|
||||
event_msecs = MAX(0, event_msecs);
|
||||
}
|
||||
|
||||
#if HAVE_PCAP
|
||||
#ifndef PCAP_CAN_DO_SELECT
|
||||
|
||||
Reference in New Issue
Block a user