coverity 182069: coverity confused by use of bool as array index
authorAndy Green <andy@warmcat.com>
Fri, 28 Jul 2017 06:20:42 +0000 (14:20 +0800)
committerAndy Green <andy@warmcat.com>
Fri, 28 Jul 2017 06:25:25 +0000 (14:25 +0800)
plugins/generic-sessions/protocol_generic_sessions.c

index 147d7c1..521b539 100644 (file)
@@ -474,7 +474,7 @@ callback_generic_sessions(struct lws *wsi, enum lws_callback_reasons reason,
                                             WSI_TOKEN_HOST) < 0)
                                        return 1;
                                lws_snprintf(pss->onward, sizeof(pss->onward) - 1,
-                                        "%s%s%s", oprot[lws_is_ssl(wsi)],
+                                        "%s%s%s", oprot[!!lws_is_ssl(wsi)],
                                            cookie, args->p);
                                lwsl_notice("redirecting to ourselves with cookie refresh\n");
                                /* we need a redirect to ourselves, session cookie is expired */