diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-10 19:31:10 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-10 19:31:10 +0000 |
commit | 35460afc4896b22b0df743b70003e8768d78111a (patch) | |
tree | 8491925a6646e175bb0215676bd05cb169e04cbe /src/libsystemd-bus/bus-error.c | |
parent | ecad10fe4a4c247da72cafbc7b37f843c7c30c06 (diff) |
Revert "libsystemd-bus: use assert_return"
This reverts commit f7e2bd5a8070ba86cba6bcbf7d1c9a8173d846d4.
Most of these checks are not programming errors, but happen during
normal runtime. For example bus_kernel_pop_memfd() is called all the
time on non-kdbus systems and is supposed to quickly fail if kdbus is
not available. However, assert_return() makes this failure
expensive, and hence has no place here. With the most recent change to
assert_return() it will even log a debug message, which should never
happen here.
Diffstat (limited to 'src/libsystemd-bus/bus-error.c')
-rw-r--r-- | src/libsystemd-bus/bus-error.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-error.c b/src/libsystemd-bus/bus-error.c index 4f18629758..25eaf0eee4 100644 --- a/src/libsystemd-bus/bus-error.c +++ b/src/libsystemd-bus/bus-error.c @@ -39,7 +39,8 @@ static int bus_error_name_to_errno(const char *name) { const char *p; int r; - assert_return(name, EINVAL); + if (!name) + return EINVAL; p = startswith(name, "System.Error."); if (p) { |