[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43982: strerror return value
From: |
Lars Ingebrigtsen |
Subject: |
bug#43982: strerror return value |
Date: |
Wed, 14 Oct 2020 06:20:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Philipp Klaus Krause <pkk@spth.de> writes:
> This is just a very minor issue.
>
> emacs contains two calls to strerror where the result is assigned
> to a char *. However, according to the strerror specification, the
> string returned by strerror should never be changed, so it would be
> better to use const char * instead.
>
> See the attached patch for the trivial fix.
[...]
> - char *s = strerror (errno);
> + const char *s = strerror (errno);
Makes sense; I've now applied this to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no