Skip to content

Commit c8933d0

Browse files
committed
net: if: Fix array comparison warning
This commit fixes the array comparison warning (`-Warray-compare`) on the `_net_if_list_start` and `_net_if_list_end` arrays by making the comparison explicitly on the addresses rather than the array itself. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
1 parent f52f3d8 commit c8933d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/ip/net_if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ struct net_if *net_if_get_default(void)
563563
{
564564
struct net_if *iface = NULL;
565565

566-
if (_net_if_list_start == _net_if_list_end) {
566+
if (&_net_if_list_start[0] == &_net_if_list_end[0]) {
567567
return NULL;
568568
}
569569

0 commit comments

Comments
 (0)