]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: lua: Use a const address to retrieve info about a connection
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Oct 2021 13:36:08 +0000 (15:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Oct 2021 09:34:21 +0000 (11:34 +0200)
hlua_socket_info() only extracts information about an address, there is no
reason to not use a const.

src/hlua.c

index 9de8fc6836ad061f4fbe75f131ab613366628dff..ab92ff79b862282ce9edd478f3b2300e4cc57caa 100644 (file)
@@ -2500,7 +2500,7 @@ static int hlua_socket_send(struct lua_State *L)
 }
 
 #define SOCKET_INFO_MAX_LEN sizeof("[0000:0000:0000:0000:0000:0000:0000:0000]:12345")
-__LJMP static inline int hlua_socket_info(struct lua_State *L, struct sockaddr_storage *addr)
+__LJMP static inline int hlua_socket_info(struct lua_State *L, const struct sockaddr_storage *addr)
 {
        static char buffer[SOCKET_INFO_MAX_LEN];
        int ret;