openssl: use explicit result for SSL_in_init (#14597)

Sometimes the analysis might get funky and decide that the if-expression
below is not an if-expression. Details of how this can happen is largely
unknown, but it's easy to prevent so we will just go forward with that.

Fix #14591
This commit is contained in:
alaviss
2020-06-08 01:15:10 -05:00
committed by GitHub
parent 52841dba09
commit 8edac9cf1d

View File

@@ -418,9 +418,9 @@ else:
sslState {.global.} = cast[proc(ssl: SslPtr): cint {.cdecl, gcsafe.}](sslSymNullable("SSL_state"))
if not theProc.isNil:
theProc(ssl)
result = theProc(ssl)
elif not sslState.isNil:
sslState(ssl) and SSL_ST_INIT
result = sslState(ssl) and SSL_ST_INIT
else:
raiseInvalidLibrary MainProc