From: Lennart Poettering Date: Mon, 4 Jun 2018 16:03:57 +0000 (+0200) Subject: core: use device_found_to_string_many() result only on success X-Git-Tag: v239~123^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43ba7d71e550908be101c6d00eb3e8f0e372db4e;p=thirdparty%2Fsystemd.git core: use device_found_to_string_many() result only on success --- diff --git a/src/core/device.c b/src/core/device.c index 30707d07a75..9d09a219d5d 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -222,8 +222,8 @@ static int device_serialize(Unit *u, FILE *f, FDSet *fds) { unit_serialize_item(u, f, "state", device_state_to_string(d->state)); - (void) device_found_to_string_many(d->found, &s); - unit_serialize_item(u, f, "found", s); + if (device_found_to_string_many(d->found, &s) >= 0) + unit_serialize_item(u, f, "found", s); return 0; }