From: Willy Tarreau Date: Fri, 8 Oct 2021 13:52:27 +0000 (+0200) Subject: BUILD: connection: avoid a build warning on FreeBSD with SO_USER_COOKIE X-Git-Tag: v2.5-dev9~30 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=de361ad22e4a093f5dfd9b9233889c148af2f523;p=haproxy-2.5.git BUILD: connection: avoid a build warning on FreeBSD with SO_USER_COOKIE It was brough by an unneeded addition of a local variable after a test in commit f7f53afcf ("BUILD/MEDIUM: tcp: set-mark setting support for FreeBSD."). No backport needed. --- diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h index 84c6645..17dad4b 100644 --- a/include/haproxy/connection.h +++ b/include/haproxy/connection.h @@ -488,8 +488,7 @@ static inline void conn_set_mark(const struct connection *conn, int mark) #if defined(SO_MARK) setsockopt(conn->handle.fd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)); #elif defined(SO_USER_COOKIE) - uint32_t mval = (uint32_t)mark; - setsockopt(conn->handle.fd, SOL_SOCKET, SO_USER_COOKIE, &mval, sizeof(mval)); + setsockopt(conn->handle.fd, SOL_SOCKET, SO_USER_COOKIE, &mark, sizeof(mark)); #elif defined(SO_RTABLE) setsockopt(conn->handle.fd, SOL_SOCKET, SO_RTABLE, &mark, sizeof(mark)); #endif