]> 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:21 +0000 (15:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 21 Jul 2010 19:57:21 +0000 (15:57 -0400)
as const regardless.

--HG--
branch : 1.7

exec_pty.c

index da79664ac214f50a4bef5dbd09dba01d13527c72..af034d56624598e836154481a07a82fa036bd476 100644 (file)
@@ -514,7 +514,7 @@ pty_close(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));