tree-wide: check for NULLs in more places

Fixes issues pointed out by the `cpp/inconsistent-null-check` LGTM
query.
This commit is contained in:
Frantisek Sumsal
2021-12-06 08:50:53 +09:00
committed by Yu Watanabe
parent bf71ade808
commit c73f413d8d
7 changed files with 22 additions and 0 deletions
+2
View File
@@ -511,6 +511,8 @@ static int netdev_macsec_fill_message_create(NetDev *netdev, Link *link, sd_netl
v = MACSEC(netdev);
assert(v);
if (v->port > 0) {
r = sd_netlink_message_append_u16(m, IFLA_MACSEC_PORT, v->port);
if (r < 0)