]> granicus.if.org Git - sudo/commitdiff
Use sigaction_t and quiet a gcc warning.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 9 Dec 2001 05:27:11 +0000 (05:27 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 9 Dec 2001 05:27:11 +0000 (05:27 +0000)
tgetpass.c

index 8d78f1c8038c034986e0ab8e6ce5da8c0a91a67a..2c0626831037c22be0a8f9247b8acef47e571c6a 100644 (file)
@@ -130,7 +130,7 @@ tgetpass(prompt, timeout, flags)
     int timeout;
     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];
     int input, output, save_errno;
     struct TERM term, oterm;
@@ -267,6 +267,7 @@ tgetline(fd, buf, bufsiz, timeout)
        free(readfds);
     } else {
        /* Keep reading until out of space, EOF, error, or newline */
+       n = -1;
        while (--left && (n = read(fd, &c, 1)) == 1 && c != '\n' && c != '\r')
            *cp++ = c;
     }