projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99163b7
)
CLEANUP: lua: Use a const address to retrieve info about a connection
author
Christopher Faulet
<cfaulet@haproxy.com>
Fri, 22 Oct 2021 13:36:08 +0000
(15:36 +0200)
committer
Christopher 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
patch
|
blob
|
history
diff --git
a/src/hlua.c
b/src/hlua.c
index
9de8fc6
..
ab92ff7
100644
(file)
--- 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;