Mark the return value from strerror as a constant

* src/emacs.c (main): Mark the return from strerror as a constant,
since it shouldn't be changed (bug#43982).

* lib-src/movemail.c (pfatal_and_delete): Ditto.

Copyright-paperwork-exempt: yes
This commit is contained in:
Philipp Klaus Krause 2020-10-14 06:19:33 +02:00 committed by Lars Ingebrigtsen
parent f256687bd4
commit 14e00d95c4
2 changed files with 2 additions and 2 deletions

View file

@ -580,7 +580,7 @@ pfatal_with_name (char *name)
static void
pfatal_and_delete (char *name)
{
char *s = strerror (errno);
const char *s = strerror (errno);
unlink (name);
fatal ("%s for %s", s, name);
}

View file

@ -1273,7 +1273,7 @@ main (int argc, char **argv)
|| (fcntl (STDIN_FILENO, F_DUPFD_CLOEXEC, STDOUT_FILENO)
!= STDOUT_FILENO))
{
char *errstring = strerror (errno);
const char *errstring = strerror (errno);
fprintf (stderr, "%s: %s: %s\n", argv[0], term, errstring);
exit (EXIT_FAILURE);
}