mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-18 11:40:50 +00:00
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.
This commit is contained in:
parent
99163b75ec
commit
e6465b3b75
@ -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")
|
#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];
|
static char buffer[SOCKET_INFO_MAX_LEN];
|
||||||
int ret;
|
int ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user