瀏覽代碼

Remove "false positive" marker for PVS Studio, since the marker does not work

PVS Studio still issues the "condition is always true" warning (see #597),
although there is a //-V547 marker. Remove the useless marker comment..
bel2125 5 年之前
父節點
當前提交
0ab411a25d
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      src/civetweb.c

+ 2 - 4
src/civetweb.c

@@ -9338,8 +9338,7 @@ connect_socket(struct mg_context *ctx /* may be NULL */,
 		return 0;
 	}
 
-	if (ip_ver
-	    == 4) { //-V547 - condition is always true, if USE_IPV6 is not set
+	if (ip_ver == 4) {
 		*sock = socket(PF_INET, SOCK_STREAM, 0);
 	}
 #if defined(USE_IPV6)
@@ -9372,8 +9371,7 @@ connect_socket(struct mg_context *ctx /* may be NULL */,
 
 	set_close_on_exec(*sock, NULL, ctx);
 
-	if (ip_ver
-	    == 4) { //-V547 - condition is always true, if USE_IPV6 is not set
+	if (ip_ver == 4) {
 		/* connected with IPv4 */
 		conn_ret = connect(*sock,
 		                   (struct sockaddr *)((void *)&sa->sin),