From c3115feb7e1d07bccae814dffcecb3b31798c12a Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sun, 8 Apr 2018 11:37:00 +0000 Subject: [PATCH] Fix a signed/unsigned warning showing up for the userland stack on some platforms. Thanks to Felix Weinrank for reporting the issue. MFC after:i 3 days --- sys/netinet/sctp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index d82a962c6c1..6554399e06e 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2616,7 +2616,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, (sizeof(uint32_t)))); diff = now; timevalsub(&diff, &time_expires); - if (diff.tv_sec > UINT32_MAX / 1000000) { + if ((uint32_t)diff.tv_sec > UINT32_MAX / 1000000) { staleness = UINT32_MAX; } else { staleness = diff.tv_sec * 1000000;