From 69be409b872cbe9acb7a22954997ed590eb7e921 Mon Sep 17 00:00:00 2001 From: Jessie Murray Date: Sun, 18 Jul 2021 17:53:49 -0700 Subject: [PATCH] PR review: unused code, comment style --- src/slog.c | 2 +- src/worker.c | 1 + tests/websocket.c | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slog.c b/src/slog.c index cae6d9a..9bae415 100644 --- a/src/slog.c +++ b/src/slog.c @@ -130,7 +130,7 @@ slog_internal(struct server *s, log_level level, } /** - * This wrapper around slog_internal that first checks the log level. + * Thin wrapper around slog_internal that first checks the log level. */ void slog(struct server *s, log_level level, diff --git a/src/worker.c b/src/worker.c index 964d154..d5decef 100644 --- a/src/worker.c +++ b/src/worker.c @@ -35,6 +35,7 @@ worker_new(struct server *s) { void worker_can_read(int fd, short event, void *p) { + struct http_client *c = p; int ret, nparsed; diff --git a/tests/websocket.c b/tests/websocket.c index 38f475e..cab2300 100644 --- a/tests/websocket.c +++ b/tests/websocket.c @@ -313,7 +313,6 @@ ws_on_header_field(http_parser *p, const char *at, size_t length) { } wt->debug("%s appended header name data: currently [%.*s]\n", __func__, (int)wt->cur_hdr_key_len, wt->cur_hdr_key); - // wt->cur_header_is_ws_resp = (strncasecmp(at, "Sec-WebSocket-Accept", 20) == 0) ? 1 : 0; wt->hdr_last_cb_was_name = 1; return 0; @@ -419,7 +418,7 @@ ws_on_message_complete(http_parser *p) { struct worker_thread *wt = p->data; wt->debug("%s (wt=%p), upgrade=%d\n", __func__, wt, p->upgrade); - // we've received the full HTTP response now, so we're ready to send frames + /* we've received the full HTTP response now, so we're ready to send frames */ wt->state = WS_RECEIVED_HANDSHAKE; ws_enqueue_frame(wt); /* add frame to buffer and register interest in writing */ return 0;