Correct last clang warnings in readpassphrase

This commit is contained in:
Ben RUBSON 2017-10-20 07:31:44 +02:00 committed by GitHub
parent d693858947
commit 4293ce49b9

View File

@ -126,6 +126,8 @@ restart:
}
if (write(output, prompt, strlen(prompt)) != -1) {
//dummy test to get rid of warn_unused_result compilation warning
}
end = buf + bufsiz - 1;
for (p = buf; (nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r';) {
if (p < end) {
@ -144,7 +146,6 @@ restart:
}
}
*p = '\0';
}
save_errno = errno;
if ((term.c_lflag & ECHO) == 0u) {
if (write(output, "\n", 1) != -1) {