From aca066228df7f9caadae375317947084657bb08a Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 7 Jun 2022 17:32:53 +0000 Subject: [PATCH] Tweak readability of a test: compare tmp explicitly against 0 and drop redundant parentheses. ok jsing --- lib/libssl/ssl_sess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c index af1fd3c8bfa..969371b1de3 100644 --- a/lib/libssl/ssl_sess.c +++ b/lib/libssl/ssl_sess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_sess.c,v 1.113 2022/06/07 17:31:36 tb Exp $ */ +/* $OpenBSD: ssl_sess.c,v 1.114 2022/06/07 17:32:53 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -378,7 +378,7 @@ ssl_get_new_session(SSL *s, int session) * Don't allow the callback to set the session length to zero. * nor set it higher than it was. */ - if (!tmp || (tmp > ss->session_id_length)) { + if (tmp == 0 || tmp > ss->session_id_length) { /* The callback set an illegal length */ SSLerror(s, SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH); SSL_SESSION_free(ss); -- 2.20.1