[systemd-commits] src/libsystemd-bus

Lennart Poettering lennart at kemper.freedesktop.org
Thu Jan 9 21:36:00 PST 2014


 src/libsystemd-bus/bus-error.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit bc6a6232481bf1e977de08e1eebecdcf28391cf8
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 10 13:35:12 2014 +0800

    bus: convert a bus error with NULL name into an errno of 0 in sd_bus_error_get_errno()

diff --git a/src/libsystemd-bus/bus-error.c b/src/libsystemd-bus/bus-error.c
index 35bd4f0..c2e41fb 100644
--- a/src/libsystemd-bus/bus-error.c
+++ b/src/libsystemd-bus/bus-error.c
@@ -285,6 +285,9 @@ _public_ int sd_bus_error_get_errno(const sd_bus_error* e) {
         if (!e)
                 return 0;
 
+        if (!e->name)
+                return 0;
+
         return bus_error_name_to_errno(e->name);
 }
 



More information about the systemd-commits mailing list