From 80c630f6574a33b1c633815a174110d10ec37c60 Mon Sep 17 00:00:00 2001 From: TJ Saunders Date: Tue, 31 May 2016 14:09:17 -0700 Subject: [PATCH] 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) --- doc/ssl/SSL_SESSION_get_protocol_version.pod | 3 ++- ssl/ssl_sess.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) 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; } -- 2.25.1