Blob Blame History Raw
From d67968957aece7a1d4da581d86ad719c9a7fad21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 7 Mar 2015 14:23:38 -0500
Subject: [PATCH] login: fix copy-pasto in error path

CID #1256583.

(cherry picked from commit dcee01125dde502bd8108c36ddf2026c1348865f)
---
 src/login/inhibit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 44bda34aff..88af23e35c 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -260,7 +260,7 @@ int main(int argc, char *argv[]) {
 
                 fd = inhibit(bus, &error);
                 if (fd < 0) {
-                        log_error("Failed to inhibit: %s", bus_error_message(&error, -r));
+                        log_error("Failed to inhibit: %s", bus_error_message(&error, fd));
                         return EXIT_FAILURE;
                 }