diff options
author | alaviss <leorize+oss@disroot.org> | 2020-06-08 01:15:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 08:15:10 +0200 |
commit | 8edac9cf1d8a052b306e43ba92b3a91f51a221be (patch) | |
tree | d3c04b13ce75974516a086e63d66f194721e7906 /lib/wrappers/openssl.nim | |
parent | 52841dba0936d3679d2c7115fed620c35627155d (diff) | |
download | Nim-8edac9cf1d8a052b306e43ba92b3a91f51a221be.tar.gz |
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
Diffstat (limited to 'lib/wrappers/openssl.nim')
-rw-r--r-- | lib/wrappers/openssl.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index b7f18ad79..bea96127d 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -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 |