From 4c5c1aa9f92fb018eddf5145a13a35864b650d99 Mon Sep 17 00:00:00 2001 From: Aaron Conole Date: Mon, 14 Oct 2024 12:05:56 +0200 Subject: [PATCH] conntrack: Fix Windows build due to ternary syntax extension. In the cited commit a ternary using syntax extension slipped in. The extension allows omitting the second operand and it is not supported by MSVC resulting in a build failure. Fix it by simply specifying the second operand. Fixes: b57c1da5c39a ("conntrack: Use a per zone default limit.") Reported-by: Ilya Maximets [Paolo: added commit message] Co-authored-by: Paolo Valerio Signed-off-by: Paolo Valerio Signed-off-by: Aaron Conole Signed-off-by: Eelco Chaudron --- lib/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/conntrack.c b/lib/conntrack.c index 0061a563647..f4b150bee5c 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -313,7 +313,7 @@ zone_limit_get_limit(struct conntrack *ct, struct conntrack_zone_limit *czl) if (limit == ZONE_LIMIT_CONN_DEFAULT) { atomic_read_relaxed(&ct->default_zone_limit, &limit); - limit = limit ? : -1; + limit = limit ? limit : -1; } return limit;