summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Sonnenberger <joerg@NetBSD.org>2014-03-19 09:26:37 +0100
committerThomas Klausner <wiz@NetBSD.org>2014-03-19 09:26:37 +0100
commit42ca8d956276bc00bec09e410d76daf053ae35f9 (patch)
treebf7004231f139f2fb8c0abf18efb1a0efcd7e40d
parent3425cbb0e6086f74783eafbe23df1121b655e006 (diff)
Fix abs() usage.
For long arguments, use labs(). Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
-rw-r--r--src/create.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/create.c b/src/create.c
index 98678d8..d013da9 100644
--- a/src/create.c
+++ b/src/create.c
@@ -347,10 +347,10 @@ SetCloseColor(
closenesses[i].cols_index = i;
closenesses[i].closeness =
- COLOR_FACTOR * (abs((long) col->red - (long) cols[i].red)
- + abs((long) col->green - (long) cols[i].green)
- + abs((long) col->blue - (long) cols[i].blue))
- + BRIGHTNESS_FACTOR * abs(((long) col->red +
+ COLOR_FACTOR * (labs((long) col->red - (long) cols[i].red)
+ + labs((long) col->green - (long) cols[i].green)
+ + labs((long) col->blue - (long) cols[i].blue))
+ + BRIGHTNESS_FACTOR * labs(((long) col->red +
(long) col->green +
(long) col->blue)
- ((long) cols[i].red +