Jelajahi Sumber

Fix: error: suggest parentheses around assignment used as truth value

Jochen Scheib 10 tahun lalu
induk
melakukan
e1917feb0d
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -7287,8 +7287,8 @@ static int send_websocket_handshake(struct mg_connection *conn)
 	          "Sec-WebSocket-Accept: ",
 	          b64_sha,
 	          "\r\n");
-
-	if (protocol = mg_get_header(conn, "Sec-WebSocket-Protocol")) {
+	protocol = mg_get_header(conn, "Sec-WebSocket-Protocol");
+	if (protocol) {
 	mg_printf(conn,
 		"%s%s%s",
 		"Sec-WebSocket-Protocol:",