summaryrefslogtreecommitdiff
path: root/crypto.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-08-23 19:50:31 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2016-08-25 17:39:01 -0800
commitcdd61de630124d5b3d30e8927c9be02735f85f80 (patch)
tree522d4e4c835378f31782da90efabc15f4345bc64 /crypto.c
parent932ece1567dfc4ea7d993c8f62ccc9adfcf736ef (diff)
Rework option handling
Diffstat (limited to 'crypto.c')
-rw-r--r--crypto.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto.c b/crypto.c
index 5bf569d..e98e486 100644
--- a/crypto.c
+++ b/crypto.c
@@ -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);