[systemd-devel] [PATCHv2 1/2] backlight: Fix copy/paste error printing an unrelated error code
Josh Triplett
josh at joshtriplett.org
Tue Mar 11 21:09:04 PDT 2014
udev_device_get_sysattr_value returns NULL on failure, but doesn't
provide an error code; thus, when printing an error from it, don't print
an unrelated error code from a previous call.
---
v2: Patch 1/2 unchanged from v1.
src/backlight/backlight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
index 86f10cc..81470b3 100644
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
@@ -322,7 +322,7 @@ int main(int argc, char *argv[]) {
value = udev_device_get_sysattr_value(device, "brightness");
if (!value) {
- log_error("Failed to read system attribute: %s", strerror(-r));
+ log_error("Failed to read system attribute");
return EXIT_FAILURE;
}
--
1.9.0
More information about the systemd-devel
mailing list