From: Josh Triplett Date: Wed, 12 Mar 2014 04:09:04 +0000 (-0700) Subject: backlight: Fix copy/paste error printing an unrelated error code X-Git-Tag: v212~212 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=cddc35f75ecff63b2ffd3f8e4c863d475e7b14ca;p=elogind.git backlight: Fix copy/paste error printing an unrelated error code 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. --- diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c index 86f10cc0c..81470b3f9 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; }