aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-01-18 00:01:25 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2015-01-18 00:01:25 +0100
commit657d89a6a0e1f3e97299811cf50cf59785a1328b (patch)
tree827f933e2a0dc886033419ca34af0eb3e196468d
parent5f4379bfe7fcd17216160e945b66d72002b2b0b2 (diff)
downloadsds-657d89a6a0e1f3e97299811cf50cf59785a1328b.tar.xz
sdsfromlonglong: Cast abs ternary statement to ull
Fixes the warning about the ternary statement changing the signedness of value.
-rw-r--r--src/sds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sds.c b/src/sds.c
index 6573634..35132a9 100644
--- a/src/sds.c
+++ b/src/sds.c
@@ -531,7 +531,7 @@ sds sdsfromlonglong(long long value) {
char buf[32], *p;
unsigned long long v;
- v = (value < 0) ? -value : value;
+ v = (unsigned long long)((value < 0) ? -value : value);
p = buf+31; /* point to the last character */
do {
*p-- = '0'+(v%10);