summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-09-25 13:36:54 +0200
committerDaniel Mack <daniel@zonque.org>2015-09-30 11:41:03 +0200
commit5cfee41459d54e13fd61238a0440cd4453421ed6 (patch)
tree1635065a8f9d9c0950aabef6fe37a50b91fb4494 /src/libsystemd-network
parent2ea69f8d5e4a83397c5050914adf6452cafa9559 (diff)
tree-wide: use strempty() where possible
Also add a Coccinell patch to detect such locations in the future.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/sd-pppoe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-pppoe.c b/src/libsystemd-network/sd-pppoe.c
index 439d4eff38..f2baafdeb9 100644
--- a/src/libsystemd-network/sd-pppoe.c
+++ b/src/libsystemd-network/sd-pppoe.c
@@ -385,7 +385,7 @@ static int pppoe_send_initiation(sd_pppoe *ppp) {
return r;
log_debug("PPPoE: sent DISCOVER (Service-Name: %s)",
- ppp->service_name ? : "");
+ strempty(ppp->service_name));
pppoe_arm_timeout(ppp);
@@ -625,8 +625,8 @@ static int pppoe_handle_message(sd_pppoe *ppp, struct pppoe_hdr *packet, struct
mac->ether_addr_octet[3],
mac->ether_addr_octet[4],
mac->ether_addr_octet[5],
- ppp->tags.service_name ? : "",
- ppp->tags.ac_name ? : "");
+ strempty(ppp->tags.service_name),
+ strempty(ppp->tags.ac_name));
memcpy(&ppp->peer_mac, mac, ETH_ALEN);