diff options
author | millert@openbsd.org <millert@openbsd.org> | 2023-06-05 13:24:36 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2023-06-20 10:07:06 +1000 |
commit | b53a809a549dcd4fbde554c6aa283e597b15ea33 (patch) | |
tree | 39b385eb9a48e7489ed389a29ec5d0a06ac92944 /channels.c | |
parent | 2709809fd616a0991dc18e3a58dea10fb383c3f0 (diff) |
upstream: Store timeouts as int, not u_int as they are limited to
INT_MAX. Fixes sign compare warnings systems with 32-bit time_t due to type
promotion. OK djm@
OpenBSD-Commit-ID: 48081e9ad35705c5f1705711704a4c2ff94e87b7
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.430 2023/03/10 03:01:51 dtucker Exp $ */ +/* $OpenBSD: channels.c,v 1.431 2023/06/05 13:24:36 millert Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -154,7 +154,7 @@ struct permission_set { /* Used to record timeouts per channel type */ struct ssh_channel_timeout { char *type_pattern; - u_int timeout_secs; + int timeout_secs; }; /* Master structure for channels state */ @@ -312,11 +312,11 @@ channel_lookup(struct ssh *ssh, int id) */ void channel_add_timeout(struct ssh *ssh, const char *type_pattern, - u_int timeout_secs) + int timeout_secs) { struct ssh_channels *sc = ssh->chanctxt; - debug2_f("channel type \"%s\" timeout %u seconds", + debug2_f("channel type \"%s\" timeout %d seconds", type_pattern, timeout_secs); sc->timeouts = xrecallocarray(sc->timeouts, sc->ntimeouts, sc->ntimeouts + 1, sizeof(*sc->timeouts)); @@ -340,7 +340,7 @@ channel_clear_timeouts(struct ssh *ssh) sc->ntimeouts = 0; } -static u_int +static int lookup_timeout(struct ssh *ssh, const char *type) { struct ssh_channels *sc = ssh->chanctxt; |