mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 11:20:07 +01:00
platform: fix uninitialized variable bcaddr in build_rtnl_addr()
platform/nm-linux-platform.c: In function 'build_rtnl_addr':
platform/nm-linux-platform.c:116:15: error: 'bcaddr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
nl_addr_put (*object);
^
platform/nm-linux-platform.c:2264:32: note: 'bcaddr' was declared here
auto_nl_addr struct nl_addr *bcaddr;
^
This commit is contained in:
parent
c0e09de2b7
commit
5f32b8588e
1 changed files with 1 additions and 1 deletions
|
|
@ -2261,7 +2261,7 @@ build_rtnl_addr (int family,
|
|||
/* IPv4 Broadcast address */
|
||||
if (family == AF_INET) {
|
||||
struct in_addr bcast;
|
||||
auto_nl_addr struct nl_addr *bcaddr;
|
||||
auto_nl_addr struct nl_addr *bcaddr = NULL;
|
||||
|
||||
addr4_to_broadcast (&bcast, addr, plen);
|
||||
bcaddr = nl_addr_build (family, &bcast, addrlen);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue