[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:
Willy Tarreau 2011-01-05 15:42:54 +01:00
parent 38b4156a69
commit 7d286a0f63

View File

@ -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));