diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-04 12:59:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-06-04 13:46:03 +0200 |
commit | a1230ff972a6a5d945749e5280cd092a2aa827dd (patch) | |
tree | f6e7280a3e2162132c1b2df8cfc530105b8e431d /src/network | |
parent | Merge pull request #9176 from keszybz/flags-set (diff) | |
download | systemd-a1230ff972a6a5d945749e5280cd092a2aa827dd.tar.xz systemd-a1230ff972a6a5d945749e5280cd092a2aa827dd.zip |
basic/log: add the log_struct terminator to macro
This way all callers do not need to specify it.
Exhaustively tested by running test-log under valgrind ;)
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-dhcp4.c | 6 | ||||
-rw-r--r-- | src/network/networkd-link.c | 26 |
2 files changed, 11 insertions, 21 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index d2e79cdda6..3e7c7da5ac 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -444,8 +444,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { ADDRESS_FMT_VAL(gateway)), "ADDRESS=%u.%u.%u.%u", ADDRESS_FMT_VAL(address), "PREFIXLEN=%u", prefixlen, - "GATEWAY=%u.%u.%u.%u", ADDRESS_FMT_VAL(gateway), - NULL); + "GATEWAY=%u.%u.%u.%u", ADDRESS_FMT_VAL(gateway)); else log_struct(LOG_INFO, LOG_LINK_INTERFACE(link), @@ -453,8 +452,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { ADDRESS_FMT_VAL(address), prefixlen), "ADDRESS=%u.%u.%u.%u", ADDRESS_FMT_VAL(address), - "PREFIXLEN=%u", prefixlen, - NULL); + "PREFIXLEN=%u", prefixlen); link->dhcp_lease = sd_dhcp_lease_ref(lease); link_dirty(link); diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index c957efd409..c714cd4fc7 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2260,17 +2260,14 @@ static int link_enter_join_netdev(Link *link) { log_struct(LOG_DEBUG, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(link->network->bond), - LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->bond->ifname), - NULL); + LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->bond->ifname)); r = netdev_join(link->network->bond, link, netdev_join_handler); if (r < 0) { log_struct_errno(LOG_WARNING, r, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(link->network->bond), - LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->bond->ifname), - NULL); - + LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->bond->ifname)); link_enter_failed(link); return r; } @@ -2282,16 +2279,14 @@ static int link_enter_join_netdev(Link *link) { log_struct(LOG_DEBUG, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(link->network->bridge), - LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->bridge->ifname), - NULL); + LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->bridge->ifname)); r = netdev_join(link->network->bridge, link, netdev_join_handler); if (r < 0) { log_struct_errno(LOG_WARNING, r, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(link->network->bridge), - LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->bridge->ifname), - NULL), + LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->bridge->ifname)); link_enter_failed(link); return r; } @@ -2303,15 +2298,14 @@ static int link_enter_join_netdev(Link *link) { log_struct(LOG_DEBUG, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(link->network->vrf), - LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->vrf->ifname), - NULL); + LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->vrf->ifname)); + r = netdev_join(link->network->vrf, link, netdev_join_handler); if (r < 0) { log_struct_errno(LOG_WARNING, r, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(link->network->vrf), - LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->vrf->ifname), - NULL); + LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->vrf->ifname)); link_enter_failed(link); return r; } @@ -2329,16 +2323,14 @@ static int link_enter_join_netdev(Link *link) { log_struct(LOG_DEBUG, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(netdev), - LOG_LINK_MESSAGE(link, "Enslaving by '%s'", netdev->ifname), - NULL); + LOG_LINK_MESSAGE(link, "Enslaving by '%s'", netdev->ifname)); r = netdev_join(netdev, link, netdev_join_handler); if (r < 0) { log_struct_errno(LOG_WARNING, r, LOG_LINK_INTERFACE(link), LOG_NETDEV_INTERFACE(netdev), - LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", netdev->ifname), - NULL); + LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", netdev->ifname)); link_enter_failed(link); return r; } |