]> granicus.if.org Git - sudo/commitdiff
The return value of strsignal() may be const and should be treated
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 21 Jul 2010 19:57:37 +0000 (15:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 21 Jul 2010 19:57:37 +0000 (15:57 -0400)
as const regardless.

src/exec_pty.c

index c32604a6f9a017d05618b1275a0acbc197c2f7cb..d73b005affcb3d708964bb0de3e0e2023f1616c7 100644 (file)
@@ -628,7 +628,7 @@ pty_close(struct command_status *cstat)
     if (cstat->type == CMD_WSTATUS && WIFSIGNALED(cstat->val)) {
        int signo = WTERMSIG(cstat->val);
        if (signo && signo != SIGINT && signo != SIGPIPE) {
-           char *reason = strsignal(signo);
+           const char *reason = strsignal(signo);
            n = io_fds[SFD_USERTTY] != -1 ?
                io_fds[SFD_USERTTY] : STDOUT_FILENO;
            write(n, reason, strlen(reason));