summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-05 13:11:26 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-05 13:12:11 +0200
commitc784c5ce777f16ee56086a072dc1466639bc9eff (patch)
tree4d092bb8f0d6a8386f29f10ccc9174be47a15723 /src/libsystemd-bus/sd-bus.c
parent1e64bbc15671db861c811bdf63014eee826a6eca (diff)
bus: use C99 struct construction for error initializers
That way we can allocate an error struct on-the-fly while calling a function. Nice!
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r--src/libsystemd-bus/sd-bus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 8c5b9da91d..0b71f3ea54 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1592,7 +1592,7 @@ static int process_builtin(sd_bus *bus, sd_bus_message *m) {
r = sd_bus_message_append(reply, "s", sd_id128_to_string(id, sid));
} else {
- _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_INIT;
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus_error_set(&error,
"org.freedesktop.DBus.Error.UnknownMethod",
@@ -1612,7 +1612,7 @@ static int process_builtin(sd_bus *bus, sd_bus_message *m) {
}
static int process_object(sd_bus *bus, sd_bus_message *m) {
- _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_INIT;
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
struct object_callback *c;
int r;
@@ -1857,7 +1857,7 @@ static int process_running(sd_bus *bus, sd_bus_message **ret) {
if (m->header->type == SD_BUS_MESSAGE_TYPE_METHOD_CALL) {
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
- _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_INIT;
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus_error_set(&error, "org.freedesktop.DBus.Error.UnknownObject", "Unknown object '%s'.", m->path);