The return value of strsignal() may be const and should be treated

as const regardless.
This commit is contained in:
Todd C. Miller
2010-07-21 15:57:37 -04:00
parent bdecb14ea6
commit c9e86ab3b9

View 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));