From 4aadc751f201f8f97c9c1f454e3a29803cce3edb Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 6 Oct 2016 14:48:52 +0200 Subject: common: Avoid pointer arithmetic on string literals. * common/gettime.c (rfctimestamp): Use indexing instead. * common/signal.c (got_fatal_signal): Likewise. --- common/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/signal.c') diff --git a/common/signal.c b/common/signal.c index b202f0f6b..9064adcd1 100644 --- a/common/signal.c +++ b/common/signal.c @@ -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; -- cgit v1.2.3