From: Andy Green Date: Fri, 29 Jan 2016 07:30:05 +0000 (+0800) Subject: coverity 157404 get rid of needless NULL check X-Git-Tag: upstream/1.7.3~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b39a151c9c32294bd2c608c19dc70d45b75215c6;p=platform%2Fupstream%2Flibwebsockets.git coverity 157404 get rid of needless NULL check Signed-off-by: Andy Green --- diff --git a/lib/ssl.c b/lib/ssl.c index bb9613a..364ab29 100644 --- a/lib/ssl.c +++ b/lib/ssl.c @@ -603,13 +603,10 @@ lws_server_socket_service_ssl(struct lws *wsi, lws_sockfd_type accept_fd) if (!LWS_SSL_ENABLED(context)) return 0; -lwsl_err("%s: mode %d, state %d\n", __func__, wsi->mode, wsi->state); + switch (wsi->mode) { case LWSCM_SSL_INIT: - if (!wsi) - return 0; - wsi->ssl = SSL_new(context->ssl_ctx); if (wsi->ssl == NULL) { lwsl_err("SSL_new failed: %s\n",