瀏覽代碼

Fix "cast from 'const struct in_addr *' to 'unsigned int *' drops const qualifier"

Kevin Wojniak 9 年之前
父節點
當前提交
58e1a4ee9e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -9099,7 +9099,7 @@ get_remote_ip(const struct mg_connection *conn)
 	if (!conn) {
 		return 0;
 	}
-	return ntohl(*(uint32_t *)&conn->client.rsa.sin.sin_addr);
+	return ntohl(*(const uint32_t *)&conn->client.rsa.sin.sin_addr);
 }