]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-link.c
network: remove redunant link name in message
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 May 2019 11:46:55 +0000 (13:46 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 May 2019 11:46:55 +0000 (13:46 +0200)
commitc98b3545008d8e984ab456dcf79787418fcbfe13
tree45fefe134c03801d3e461a4d6bd7e11cdc22737b
parentb30160ff7f70a188a5ba7d03ddbce4993f49346d
network: remove redunant link name in message

Fixes #12454.

gcc was complaining that the link->ifname argument is NULL. Adding
assert(link->ifname) right before the call has no effect. It seems that
gcc is confused by the fact that log_link_warning_errno() internally
calls log_object(), with link->ifname passed as the object. log_object()
is also a macro and is does a check whether the passed object is NULL.
So we have a check if something is NULL right next an unconditional use
of it where it cannot be NULL. I think it's a bug in gcc.

Anyway, we don't need to use link->ifname here. log_object() already prepends
the object name to the message.
src/network/networkd-link.c