core: send NULL instead of empty string
This commit is contained in:
parent
9d5527f26e
commit
79a603758d
|
@ -312,7 +312,7 @@ static int property_get_empty_string(
|
||||||
assert(bus);
|
assert(bus);
|
||||||
assert(reply);
|
assert(reply);
|
||||||
|
|
||||||
return sd_bus_message_append(reply, "s", "");
|
return sd_bus_message_append(reply, "s", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int property_get_syscall_filter(
|
static int property_get_syscall_filter(
|
||||||
|
|
|
@ -99,7 +99,7 @@ static int property_get_virtualization(
|
||||||
|
|
||||||
return sd_bus_message_append(
|
return sd_bus_message_append(
|
||||||
reply, "s",
|
reply, "s",
|
||||||
v == VIRTUALIZATION_NONE ? "" : virtualization_to_string(v));
|
v == VIRTUALIZATION_NONE ? NULL : virtualization_to_string(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int property_get_architecture(
|
static int property_get_architecture(
|
||||||
|
|
|
@ -81,7 +81,7 @@ static int property_get_following(
|
||||||
assert(u);
|
assert(u);
|
||||||
|
|
||||||
f = unit_following(u);
|
f = unit_following(u);
|
||||||
return sd_bus_message_append(reply, "s", f ? f->id : "");
|
return sd_bus_message_append(reply, "s", f ? f->id : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int property_get_dependencies(
|
static int property_get_dependencies(
|
||||||
|
@ -235,7 +235,7 @@ static int property_get_unit_file_preset(
|
||||||
r = unit_get_unit_file_preset(u);
|
r = unit_get_unit_file_preset(u);
|
||||||
|
|
||||||
return sd_bus_message_append(reply, "s",
|
return sd_bus_message_append(reply, "s",
|
||||||
r < 0 ? "":
|
r < 0 ? NULL:
|
||||||
r > 0 ? "enabled" : "disabled");
|
r > 0 ? "enabled" : "disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -918,7 +918,7 @@ static int property_get_cgroup(
|
||||||
sd_bus_error *error) {
|
sd_bus_error *error) {
|
||||||
|
|
||||||
Unit *u = userdata;
|
Unit *u = userdata;
|
||||||
const char *t;
|
const char *t = NULL;
|
||||||
|
|
||||||
assert(bus);
|
assert(bus);
|
||||||
assert(reply);
|
assert(reply);
|
||||||
|
@ -932,8 +932,6 @@ static int property_get_cgroup(
|
||||||
|
|
||||||
if (u->cgroup_path)
|
if (u->cgroup_path)
|
||||||
t = isempty(u->cgroup_path) ? "/" : u->cgroup_path;
|
t = isempty(u->cgroup_path) ? "/" : u->cgroup_path;
|
||||||
else
|
|
||||||
t = "";
|
|
||||||
|
|
||||||
return sd_bus_message_append(reply, "s", t);
|
return sd_bus_message_append(reply, "s", t);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue