From: dtucker Date: Fri, 10 Mar 2023 02:24:56 +0000 (+0000) Subject: Remove no-op (int) > INT_MAX checks since they can never be true. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b23cc7ff410b107e6915496d00d1d291d0b4cecb;p=openbsd Remove no-op (int) > INT_MAX checks since they can never be true. From Coverity CID 405031, ok djm@ --- diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 6d294050588..9138dbb7dee 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.374 2023/03/09 21:06:24 jcs Exp $ */ +/* $OpenBSD: readconf.c,v 1.375 2023/03/10 02:24:56 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2116,15 +2116,13 @@ parse_pubkey_algos: value2 = 0; /* unlimited lifespan by default */ if (value == 3 && arg2 != NULL) { /* allow "AddKeysToAgent confirm 5m" */ - if ((value2 = convtime(arg2)) == -1 || - value2 > INT_MAX) { + if ((value2 = convtime(arg2)) == -1) { error("%s line %d: invalid time value.", filename, linenum); goto out; } } else if (value == -1 && arg2 == NULL) { - if ((value2 = convtime(arg)) == -1 || - value2 > INT_MAX) { + if ((value2 = convtime(arg)) == -1) { error("%s line %d: unsupported option", filename, linenum); goto out;