From: Christopher Faulet Date: Fri, 22 Oct 2021 13:36:08 +0000 (+0200) Subject: CLEANUP: lua: Use a const address to retrieve info about a connection X-Git-Tag: v2.5-dev12~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6465b3b758a214d25b89d495dc34d8a549cacd1;p=thirdparty%2Fhaproxy.git CLEANUP: lua: Use a const address to retrieve info about a connection hlua_socket_info() only extracts information about an address, there is no reason to not use a const. --- diff --git a/src/hlua.c b/src/hlua.c index 9de8fc6836..ab92ff79b8 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -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;