mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
Correct last clang warnings in readpassphrase
This commit is contained in:
parent
d693858947
commit
4293ce49b9
@ -126,29 +126,30 @@ restart:
|
||||
}
|
||||
|
||||
if (write(output, prompt, strlen(prompt)) != -1) {
|
||||
end = buf + bufsiz - 1;
|
||||
for (p = buf; (nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r';) {
|
||||
if (p < end) {
|
||||
if ((flags & RPP_SEVENBIT) != 0) {
|
||||
ch &= 0x7f;
|
||||
}
|
||||
if (isalpha(ch) != 0) {
|
||||
if ((flags & RPP_FORCELOWER) != 0) {
|
||||
ch = tolower(ch);
|
||||
}
|
||||
if ((flags & RPP_FORCEUPPER) != 0) {
|
||||
ch = toupper(ch);
|
||||
}
|
||||
}
|
||||
*p++ = ch;
|
||||
}
|
||||
}
|
||||
*p = '\0';
|
||||
//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) {
|
||||
if ((flags & RPP_SEVENBIT) != 0) {
|
||||
ch &= 0x7f;
|
||||
}
|
||||
if (isalpha(ch) != 0) {
|
||||
if ((flags & RPP_FORCELOWER) != 0) {
|
||||
ch = tolower(ch);
|
||||
}
|
||||
if ((flags & RPP_FORCEUPPER) != 0) {
|
||||
ch = toupper(ch);
|
||||
}
|
||||
}
|
||||
*p++ = ch;
|
||||
}
|
||||
}
|
||||
*p = '\0';
|
||||
save_errno = errno;
|
||||
if ((term.c_lflag & ECHO) == 0u) {
|
||||
if(write(output, "\n", 1) != -1) {
|
||||
//dummy test to get rid of warn_unused_result compilation warning
|
||||
if (write(output, "\n", 1) != -1) {
|
||||
//dummy test to get rid of warn_unused_result compilation warning
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user