Skip to content

Commit d661eb7

Browse files
Thalleyjukkar
authored andcommitted
net: tcp2: Fixed IS_ENABLED check for NET_TCP_MAX_SEND_WINDOW_SIZE
The #if statement used IS_ENABLED to check if it was defined. IS_ENABLED will only return true if the value is 1, and false otherwise. If the NET_TCP_MAX_SEND_WINDOW_SIZE value would be e.g. 8, then the check would fail. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 408a6ce commit d661eb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/ip/tcp2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ static void tcp_in(struct tcp *conn, struct net_pkt *pkt)
15031503

15041504
conn->send_win = ntohs(th_win(th));
15051505

1506-
#if IS_ENABLED(CONFIG_NET_TCP_MAX_SEND_WINDOW_SIZE)
1506+
#if defined(CONFIG_NET_TCP_MAX_SEND_WINDOW_SIZE)
15071507
if (CONFIG_NET_TCP_MAX_SEND_WINDOW_SIZE) {
15081508
max_win = CONFIG_NET_TCP_MAX_SEND_WINDOW_SIZE;
15091509
} else

0 commit comments

Comments
 (0)