summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Albrechtskirchinger <falbrechtskirchinger@gmail.com>2014-04-03 21:17:20 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-05 00:55:19 -0400
commitee0e4cca5ac37a094dfe1074907dae70c7b7701c (patch)
treef7cdbb39340dbf1dcc6f290b60d8745a202dee44 /src
parentb3ae710c251d0ce5cf2cef63208e325497b5e323 (diff)
tty-ask-password-agent: return negative errno
Return negative errno in wall_tty_block(). get_ctty_devnr() already returns a negative errno in case of failure, no need to negate it again. Reported-by: Simon <hwold@odai.homelinux.net>
Diffstat (limited to 'src')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 1d067af229..32034741d2 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -432,7 +432,7 @@ static int wall_tty_block(void) {
r = get_ctty_devnr(0, &devnr);
if (r < 0)
- return -r;
+ return r;
if (asprintf(&p, "/run/systemd/ask-password-block/%u:%u", major(devnr), minor(devnr)) < 0)
return -ENOMEM;