From: TJ Saunders Date: Tue, 31 May 2016 21:09:17 +0000 (-0700) Subject: Remove null check, per review feedback. Note this in the docs. X-Git-Tag: OpenSSL_1_1_0-pre6~633 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80c630f6574a33b1c633815a174110d10ec37c60;p=oweals%2Fopenssl.git Remove null check, per review feedback. Note this in the docs. Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1135) --- diff --git a/doc/ssl/SSL_SESSION_get_protocol_version.pod b/doc/ssl/SSL_SESSION_get_protocol_version.pod index bc6f25ccde..a033fdd9bb 100644 --- a/doc/ssl/SSL_SESSION_get_protocol_version.pod +++ b/doc/ssl/SSL_SESSION_get_protocol_version.pod @@ -21,7 +21,8 @@ SSL_SESSION_get_protocol_version() returns a number indicating the protocol version used for the session; this number matches the constants I B or B. -If the function is passed the NULL pointer for the session B, 0 is returned. +Note that the SSL_SESSION_get_protocol_version() function +does B perform a null check on the provided session B pointer. =head1 SEE ALSO diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 128d2d7942..f13e466d2c 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -830,8 +830,6 @@ long SSL_SESSION_set_time(SSL_SESSION *s, long t) int SSL_SESSION_get_protocol_version(const SSL_SESSION *s) { - if (s == NULL) - return (0); return s->ssl_version; }