summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2022-06-07 17:32:53 +0000
committertb <>2022-06-07 17:32:53 +0000
commit8214b143dc02a8f5d559d0bfb7dc0c56acd7ab98 (patch)
tree731ea6773477e4213d9f2caf140b7d40f80eff32 /src/lib
parentc9aa377890ae955fc429d4a844cdfa4a68ea83f3 (diff)
downloadopenbsd-8214b143dc02a8f5d559d0bfb7dc0c56acd7ab98.tar.gz
openbsd-8214b143dc02a8f5d559d0bfb7dc0c56acd7ab98.tar.bz2
openbsd-8214b143dc02a8f5d559d0bfb7dc0c56acd7ab98.zip
Tweak readability of a test: compare tmp explicitly against 0 and drop
redundant parentheses. ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/ssl_sess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
index af1fd3c8bf..969371b1de 100644
--- a/src/lib/libssl/ssl_sess.c
+++ b/src/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_sess.c,v 1.113 2022/06/07 17:31:36 tb Exp $ */ 1/* $OpenBSD: ssl_sess.c,v 1.114 2022/06/07 17:32:53 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -378,7 +378,7 @@ ssl_get_new_session(SSL *s, int session)
378 * Don't allow the callback to set the session length to zero. 378 * Don't allow the callback to set the session length to zero.
379 * nor set it higher than it was. 379 * nor set it higher than it was.
380 */ 380 */
381 if (!tmp || (tmp > ss->session_id_length)) { 381 if (tmp == 0 || tmp > ss->session_id_length) {
382 /* The callback set an illegal length */ 382 /* The callback set an illegal length */
383 SSLerror(s, SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH); 383 SSLerror(s, SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH);
384 SSL_SESSION_free(ss); 384 SSL_SESSION_free(ss);