chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bus: convert a bus error with NULL name into an errno of 0 in sd_bus_error_get_errno()
[elogind.git]
/
src
/
libsystemd-bus
/
bus-error.c
diff --git
a/src/libsystemd-bus/bus-error.c
b/src/libsystemd-bus/bus-error.c
index 35bd4f0dafac4217469d61709837b9861568d84b..c2e41fb01676de2e7e79c7b4b9276af042a0e4f5 100644
(file)
--- 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);
}