From 2f3b4c8f96473b7b14b01ff79b746f3266952f7c Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 8 Mar 2017 14:10:31 +0800 Subject: [PATCH] coverity 177526: pointer difference already scaled --- lib/server-handshake.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/server-handshake.c b/lib/server-handshake.c index 85803b993..61fcef3b6 100644 --- a/lib/server-handshake.c +++ b/lib/server-handshake.c @@ -190,8 +190,7 @@ lws_extension_server_handshake(struct lws *wsi, char **p, int budget) !strncmp(args, po->name, strlen(po->name))) { oa.option_name = NULL; - oa.option_index = (po - opts) / - sizeof(*po); + oa.option_index = po - opts; oa.start = NULL; lwsl_debug("setting %s\n", po->name); if (!ext->callback(