mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
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
This commit is contained in:
@@ -106,7 +106,6 @@ size_t Process::GetMallocUsage() {
|
|||||||
sz = sizeof(size_t);
|
sz = sizeof(size_t);
|
||||||
if (mallctl("stats.allocated", &alloc, &sz, NULL, 0) == 0)
|
if (mallctl("stats.allocated", &alloc, &sz, NULL, 0) == 0)
|
||||||
return alloc;
|
return alloc;
|
||||||
else
|
|
||||||
return 0;
|
return 0;
|
||||||
#elif defined(HAVE_SBRK)
|
#elif defined(HAVE_SBRK)
|
||||||
// Note this is only an approximation and more closely resembles
|
// Note this is only an approximation and more closely resembles
|
||||||
@@ -115,7 +114,6 @@ size_t Process::GetMallocUsage() {
|
|||||||
char *EndOfMemory = (char*)sbrk(0);
|
char *EndOfMemory = (char*)sbrk(0);
|
||||||
if (EndOfMemory != ((char*)-1) && StartOfMemory != ((char*)-1))
|
if (EndOfMemory != ((char*)-1) && StartOfMemory != ((char*)-1))
|
||||||
return EndOfMemory - StartOfMemory;
|
return EndOfMemory - StartOfMemory;
|
||||||
else
|
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
#warning Cannot get malloc info on this platform
|
#warning Cannot get malloc info on this platform
|
||||||
|
Reference in New Issue
Block a user