diff options
author | Davide Italiano <davide@freebsd.org> | 2015-02-21 02:36:54 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2015-02-21 02:36:54 +0000 |
commit | 8d981962c043ed5111f8e941a1501e100e54f8f7 (patch) | |
tree | 704318ef3d87485141f27c54372476e0e043e1dd /llvm/lib/Support/Unix/Process.inc | |
parent | 40c7806451f484436aa0bdfa53254cf41d3427fa (diff) | |
download | bcm5719-llvm-8d981962c043ed5111f8e941a1501e100e54f8f7.tar.gz bcm5719-llvm-8d981962c043ed5111f8e941a1501e100e54f8f7.zip |
Small cleanup. Don't use else when not needed.
Pointed out by David Majnemer.
llvm-svn: 230122
Diffstat (limited to 'llvm/lib/Support/Unix/Process.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Process.inc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc index f52ba191ac0..df13bd22173 100644 --- a/llvm/lib/Support/Unix/Process.inc +++ b/llvm/lib/Support/Unix/Process.inc @@ -106,8 +106,7 @@ size_t Process::GetMallocUsage() { sz = sizeof(size_t); if (mallctl("stats.allocated", &alloc, &sz, NULL, 0) == 0) return alloc; - else - return 0; + return 0; #elif defined(HAVE_SBRK) // Note this is only an approximation and more closely resembles // the value returned by mallinfo in the arena field. @@ -115,8 +114,7 @@ size_t Process::GetMallocUsage() { char *EndOfMemory = (char*)sbrk(0); if (EndOfMemory != ((char*)-1) && StartOfMemory != ((char*)-1)) return EndOfMemory - StartOfMemory; - else - return 0; + return 0; #else #warning Cannot get malloc info on this platform return 0; |