- don't free user-supplied string (via -e)
[oweals/busybox.git] / libbb / bb_askpass.c
index fd12f92dc10b3dd3da7149f4787287fab90f62b1..fba82a07bf2a79175216a20a1e11182bb93c4476 100644 (file)
 #include "libbb.h"
 
 /* do nothing signal handler */
-static void askpass_timeout(int ATTRIBUTE_UNUSED ignore)
+static void askpass_timeout(int UNUSED_PARAM ignore)
 {
 }
 
-char *bb_askpass(int timeout, const char *prompt)
+char* FAST_FUNC bb_askpass(int timeout, const char *prompt)
 {
        /* Was static char[BIGNUM] */
        enum { sizeof_passwd = 128 };
@@ -45,7 +45,7 @@ char *bb_askpass(int timeout, const char *prompt)
        sa.sa_handler = askpass_timeout;
        sigaction(SIGINT, &sa, &oldsa);
        if (timeout) {
-               sigaction(SIGALRM, &sa, NULL);
+               sigaction_set(SIGALRM, &sa);
                alarm(timeout);
        }
 
@@ -68,7 +68,7 @@ char *bb_askpass(int timeout, const char *prompt)
        if (timeout) {
                alarm(0);
        }
-       sigaction(SIGINT, &oldsa, NULL);
+       sigaction_set(SIGINT, &oldsa);
 
        tcsetattr(STDIN_FILENO, TCSANOW, &oldtio);
        bb_putchar('\n');