mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
minor code simplification
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1656
This commit is contained in:
parent
05a4a721a6
commit
daf6538cd9
@ -47,12 +47,8 @@
|
||||
static __inline__
|
||||
Bool is_overlap ( void* dst, const void* src, UInt len )
|
||||
{
|
||||
Int diff = src-dst;
|
||||
|
||||
if (diff < 0)
|
||||
diff = -diff;
|
||||
/* Now we have diff >= 0, so a cast to UInt is harmless. */
|
||||
return ( ((UInt)diff) < len);
|
||||
UInt diff = src > dst ? src-dst : dst-src;
|
||||
return (diff < len);
|
||||
}
|
||||
|
||||
static __inline__
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user