summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index d19c79e34b..e461ebe977 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -166,7 +166,7 @@ bool event_add_to_poll_args(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
return true;
}
if (ev->timer_events == NULL) {
- *ptimeout = INT_MAX;
+ *ptimeout = MIN(*ptimeout, INT_MAX);
return true;
}