]> diplodocus.org Git - nmh/commitdiff
netsec_set_tls(): Return a value in the !TLS_SUPPORT && !tls case.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 24 Oct 2016 17:59:30 +0000 (18:59 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 24 Oct 2016 17:59:30 +0000 (18:59 +0100)
Silences clang.

sbr/netsec.c

index c07371a..7972d1f 100644 (file)
@@ -1422,8 +1422,8 @@ netsec_set_oauth_service(netsec_context *nsc, const char *service)
 int
 netsec_set_tls(netsec_context *nsc, int tls, char **errstr)
 {
-    if (tls) {
 #ifdef TLS_SUPPORT
+    if (tls) {
        SSL *ssl;
        BIO *rbio, *wbio, *ssl_bio;;
 
@@ -1529,13 +1529,14 @@ netsec_set_tls(netsec_context *nsc, int tls, char **errstr)
     BIO_free_all(nsc->ssl_io);
     nsc->ssl_io = NULL;
 
-    return OK;
 #else /* TLS_SUPPORT */
+    if (tls) {
        netsec_err(errstr, "TLS is not supported");
-
        return NOTOK;
     }
 #endif /* TLS_SUPPORT */
+
+    return OK;
 }
 
 /*