summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-07-20 18:08:13 +0200
committerTom Gundersen <teg@jklm.no>2015-07-20 18:08:13 +0200
commit3083663e5d479fa6da69f1bafb3e6ea534fbf84a (patch)
treed5c6bf33f0842a88b9f7632f1ec17f5737adc1d6
parent31053e929ed2f13b22b76d0d2819d11189f696b6 (diff)
parentd41eee127aca04203c37d0d3cfb45e18fb9e5329 (diff)
Merge pull request #630 from namhyung/use-isempty
sd-bus: use isempty() consistently
-rw-r--r--src/libsystemd/sd-bus/bus-control.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 99115d5e49..c53666ddd0 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -1131,7 +1131,7 @@ static int add_name_change_match(sd_bus *bus,
/* If the old name is unset or empty, then
* this can match against added names */
- if (!old_owner || old_owner[0] == 0) {
+ if (isempty(old_owner)) {
item->type = KDBUS_ITEM_NAME_ADD;
r = ioctl(bus->input_fd, KDBUS_CMD_MATCH_ADD, m);
@@ -1141,7 +1141,7 @@ static int add_name_change_match(sd_bus *bus,
/* If the new name is unset or empty, then
* this can match against removed names */
- if (!new_owner || new_owner[0] == 0) {
+ if (isempty(new_owner)) {
item->type = KDBUS_ITEM_NAME_REMOVE;
r = ioctl(bus->input_fd, KDBUS_CMD_MATCH_ADD, m);
@@ -1185,7 +1185,7 @@ static int add_name_change_match(sd_bus *bus,
/* If the old name is unset or empty, then this can
* match against added ids */
- if (!old_owner || old_owner[0] == 0) {
+ if (isempty(old_owner)) {
item->type = KDBUS_ITEM_ID_ADD;
if (!isempty(new_owner))
item->id_change.id = new_owner_id;
@@ -1197,7 +1197,7 @@ static int add_name_change_match(sd_bus *bus,
/* If thew new name is unset or empty, then this can
* match against removed ids */
- if (!new_owner || new_owner[0] == 0) {
+ if (isempty(new_owner)) {
item->type = KDBUS_ITEM_ID_REMOVE;
if (!isempty(old_owner))
item->id_change.id = old_owner_id;