Explorar o código

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

Kevin Wojniak %!s(int64=9) %!d(string=hai) anos
pai
achega
58e1a4ee9e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
 }