summaryrefslogtreecommitdiff
path: root/lib/Support/Unix/Process.inc
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2015-02-21 02:36:54 +0000
committerDavide Italiano <davide@freebsd.org>2015-02-21 02:36:54 +0000
commita983427f67e227649ca3da4cd8f81cc41a56e155 (patch)
treeea19041b03856136bd65da256386219874043e18 /lib/Support/Unix/Process.inc
parentca7e0787f09cb754e4cd5b507292834ee92992d4 (diff)
Small cleanup. Don't use else when not needed.
Pointed out by David Majnemer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix/Process.inc')
-rw-r--r--lib/Support/Unix/Process.inc6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc
index f52ba191ac0..df13bd22173 100644
--- a/lib/Support/Unix/Process.inc
+++ b/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;