diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:02:09 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:02:09 +0200 |
commit | 716336f1d460ba8be8ed6e2eba26ed7e145c0dc7 (patch) | |
tree | 044d155cbf005e72ae84a430d95cb2a4d3486076 /common/misc.c | |
parent | a71ce0c1891c07efc63b14664e15d57427509922 (diff) | |
download | barebox-716336f1d460ba8be8ed6e2eba26ed7e145c0dc7.tar.gz barebox-716336f1d460ba8be8ed6e2eba26ed7e145c0dc7.tar.xz |
svn_rev_603
Diffstat (limited to 'common/misc.c')
-rw-r--r-- | common/misc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/common/misc.c b/common/misc.c index ab7a53e93f..ac6a43df58 100644 --- a/common/misc.c +++ b/common/misc.c @@ -21,14 +21,12 @@ void *sbrk_no_zero(ptrdiff_t increment) ulong old = mem_malloc_brk; ulong new = old + increment; - if ((new < mem_malloc_start) || (new > mem_malloc_end)) { - return (NULL); - } + if ((new < mem_malloc_start) || (new > mem_malloc_end)) + return NULL; - memset ((void *)old, 0, increment); mem_malloc_brk = new; - return ((void *) old); + return (void *)old; } void *sbrk (ptrdiff_t increment) |