Skip to content

Commit

Permalink
net: net_if.c: Fix build warning
Browse files Browse the repository at this point in the history
Fix compilation warning in GCC 12 when it's not obvious that we want to
compare the adresses of the first elements of two arrays

Signed-off-by: Hristo Mitrev <[email protected]>
  • Loading branch information
HrMitrev authored and stephanosio committed Jul 29, 2022
1 parent 9e7255a commit fc72871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/net/ip/net_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ struct net_if *net_if_get_default(void)
{
struct net_if *iface = NULL;

if (_net_if_list_start == _net_if_list_end) {
if (&_net_if_list_start[0] == &_net_if_list_end[0]) {
return NULL;
}

Expand Down

0 comments on commit fc72871

Please sign in to comment.