mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00:00
[BUILD] frontend: shut a warning with TCP_MAXSEG
src/frontend.c: In function 'frontend_accept': src/frontend.c:110: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness The argument should be socklen_t and not int.
This commit is contained in:
parent
38b4156a69
commit
7d286a0f63
@ -106,7 +106,7 @@ int frontend_accept(struct session *s)
|
||||
if (s->listener->maxseg < 0) {
|
||||
/* we just want to reduce the current MSS by that value */
|
||||
int mss;
|
||||
int mss_len = sizeof(mss);
|
||||
socklen_t mss_len = sizeof(mss);
|
||||
if (getsockopt(cfd, IPPROTO_TCP, TCP_MAXSEG, &mss, &mss_len) == 0) {
|
||||
mss += s->listener->maxseg; /* remember, it's < 0 */
|
||||
setsockopt(cfd, IPPROTO_TCP, TCP_MAXSEG, &mss, sizeof(mss));
|
||||
|
Loading…
Reference in New Issue
Block a user