Use sigaction_t and quiet a gcc warning.
This commit is contained in:
@@ -130,7 +130,7 @@ tgetpass(prompt, timeout, flags)
|
|||||||
int timeout;
|
int timeout;
|
||||||
int flags;
|
int flags;
|
||||||
{
|
{
|
||||||
struct sigaction sa, saveint, savehup, savequit, saveterm, savetstp;
|
sigaction_t sa, saveint, savehup, savequit, saveterm, savetstp;
|
||||||
static char buf[SUDO_PASS_MAX + 1];
|
static char buf[SUDO_PASS_MAX + 1];
|
||||||
int input, output, save_errno;
|
int input, output, save_errno;
|
||||||
struct TERM term, oterm;
|
struct TERM term, oterm;
|
||||||
@@ -267,6 +267,7 @@ tgetline(fd, buf, bufsiz, timeout)
|
|||||||
free(readfds);
|
free(readfds);
|
||||||
} else {
|
} else {
|
||||||
/* Keep reading until out of space, EOF, error, or newline */
|
/* Keep reading until out of space, EOF, error, or newline */
|
||||||
|
n = -1;
|
||||||
while (--left && (n = read(fd, &c, 1)) == 1 && c != '\n' && c != '\r')
|
while (--left && (n = read(fd, &c, 1)) == 1 && c != '\n' && c != '\r')
|
||||||
*cp++ = c;
|
*cp++ = c;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user