From 5c04a99e2afda8c6fddb2572cd6f9e975aa52238 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Sep 2007 22:35:48 +0200 Subject: [PATCH] ctype-simple.c: Avoid undefined value when negating (bug#30069) strings/ctype-simple.c: Avoid undefined value when negating (bug#30069) --- strings/ctype-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index ccdfb5936b7..0355803daa8 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -802,7 +802,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), { if (val < 0) { - val= -val; + val= -(unsigned long int)val; *dst++= '-'; len--; sign= 1; @@ -838,7 +838,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), { if (val < 0) { - val = -val; + val = -(ulonglong)val; *dst++= '-'; len--; sign= 1;