diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-31 15:02:56 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-31 15:54:03 +0200 |
commit | b5cb2d2847a3516ba794acf07d08f70d988ff7c2 (patch) | |
tree | e6f2a9e46123a99771428e98db4a06f76f15e201 /src/tty-ask-password-agent | |
parent | Merge pull request #23562 from yuwata/fix-typo (diff) | |
download | systemd-b5cb2d2847a3516ba794acf07d08f70d988ff7c2.tar.xz systemd-b5cb2d2847a3516ba794acf07d08f70d988ff7c2.zip |
tty-ask-password-agent: drop unnecessary code for non-absolute paths
utmp_wall() always prepends /dev/, so we don't need to do this a second
time here.
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r-- | src/tty-ask-password-agent/tty-ask-password-agent.c | 3 |
1 files changed, 1 insertions, 2 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 7fc0ed7c8d..09835ca903 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -99,8 +99,7 @@ static bool wall_tty_match(const char *path, void *userdata) { _cleanup_close_ int fd = -1; struct stat st; - if (!path_is_absolute(path)) - path = strjoina("/dev/", path); + assert(path_is_absolute(path)); if (lstat(path, &st) < 0) { log_debug_errno(errno, "Failed to stat %s: %m", path); |