From 4a56a28ac439137ba2b71fcb5952b4e4abd1e2fc Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sat, 29 Jul 2017 15:06:11 +0100 Subject: [PATCH 1/1] dtimezone(): Explain abs(3) is undefined on INT_MIN. That's why a negative int is flipped over into unsigned by assuming two's complement. --- sbr/dtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbr/dtime.c b/sbr/dtime.c index 3a51d87f..b3ca012a 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -291,7 +291,7 @@ char *dtimezone(int offset, int flags) unsigned os, hours, mins; pos = offset >= 0; - os = pos ? offset : ~offset + 1; + os = pos ? offset : ~offset + 1; /* abs(3) undefined on INT_MIN. */ hours = os / 60; mins = os % 60; -- 2.48.1