diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2016-08-23 19:50:31 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2016-08-25 17:39:01 -0800 |
commit | cdd61de630124d5b3d30e8927c9be02735f85f80 (patch) | |
tree | 522d4e4c835378f31782da90efabc15f4345bc64 /crypto.c | |
parent | 932ece1567dfc4ea7d993c8f62ccc9adfcf736ef (diff) |
Rework option handling
Diffstat (limited to 'crypto.c')
-rw-r--r-- | crypto.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -21,7 +21,6 @@ char *read_passphrase(const char *prompt) struct termios old, new; char *buf = NULL; size_t buflen = 0; - ssize_t ret; fprintf(stderr, "%s", prompt); fflush(stderr); @@ -34,8 +33,7 @@ char *read_passphrase(const char *prompt) if (tcsetattr(fileno(stdin), TCSAFLUSH, &new)) die("error setting terminal attrs"); - ret = getline(&buf, &buflen, stdin); - if (ret <= 0) + if (getline(&buf, &buflen, stdin) <= 0) die("error reading passphrase"); tcsetattr(fileno(stdin), TCSAFLUSH, &old); |