From: Thomas Hindoe Paaboel Andersen Date: Tue, 23 Sep 2014 19:34:21 +0000 (+0200) Subject: bus: remove unused check X-Git-Tag: v217~446 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=04c553e322680b6fcdf5b271e84b0b4b0ad8d5f9;p=elogind.git bus: remove unused check strerror_r does not return null here and even if it did we would have problems already at the preceding strlen call. Found by coverity. Fixes: CID#1237770 --- diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c index c2e41fb01..abdfd7320 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c @@ -312,7 +312,7 @@ static void bus_error_strerror(sd_bus_error *e, int error) { continue; } - if (!x || errno) { + if (errno) { free(m); return; }