diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-02-13 23:57:40 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-02-14 00:03:04 +0100 |
commit | 70dee4755a573f538e8897f97dde868bc1741170 (patch) | |
tree | a78f2486db204bacf6a8314d70a4ece855be26a5 /src/shared/ask-password-api.c | |
parent | ac7a9674e438f9048fcf1e35df4e6362843781ec (diff) | |
download | systemd-70dee4755a573f538e8897f97dde868bc1741170.tar.gz |
ask-password: let's use structure initialization properly
Diffstat (limited to 'src/shared/ask-password-api.c')
-rw-r--r-- | src/shared/ask-password-api.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 6f5a72dd46..fbe8d06c34 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -267,11 +267,14 @@ int ask_password_tty( reset_tty = true; } - zero(pollfd); - pollfd[POLL_TTY].fd = ttyfd >= 0 ? ttyfd : STDIN_FILENO; - pollfd[POLL_TTY].events = POLLIN; - pollfd[POLL_INOTIFY].fd = notify; - pollfd[POLL_INOTIFY].events = POLLIN; + pollfd[POLL_TTY] = (struct pollfd) { + .fd = ttyfd >= 0 ? ttyfd : STDIN_FILENO, + .events = POLLIN, + }; + pollfd[POLL_INOTIFY] = (struct pollfd) { + .fd = notify, + .events = POLLIN, + }; for (;;) { char c; |