1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

common: Avoid pointer arithmetic on string literals.

* common/gettime.c (rfctimestamp): Use indexing instead.
* common/signal.c (got_fatal_signal): Likewise.
This commit is contained in:
Justus Winter 2016-10-06 14:48:52 +02:00
parent b0d2526bc4
commit 4aadc751f2
2 changed files with 4 additions and 4 deletions

View file

@ -134,7 +134,7 @@ got_fatal_signal (int sig)
{
if (value >= i || ((any || i==1) && !(value/i)))
{
(void)write (2, "0123456789"+(value/i), 1);
(void)write (2, &"0123456789"[value/i], 1);
if ((value/i))
any = 1;
value %= i;