Skip to content
Snippets Groups Projects
Commit a49c59c0 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Linus Torvalds
Browse files

Make sure the value in abs() does not get truncated if it is greater than 2^32


abs() will truncate the input if is it outside the 2^32 range.  Fix that
by assuming `long' input.

This might generate worse code in the common case.

Signed-off-by: default avatarRolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d7d7561c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment