diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-26 18:26:27 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-26 18:26:27 +0200 |
commit | a318bba199a08d65c6fb804e26d0993068a4ba16 (patch) | |
tree | f6db9c4617bee3a0a1eb31f93d0f5d31d8e00fde /shell | |
parent | dbef38a74b825c15dcce737fab51c594d93b6d59 (diff) | |
download | busybox-w32-a318bba199a08d65c6fb804e26d0993068a4ba16.tar.gz busybox-w32-a318bba199a08d65c6fb804e26d0993068a4ba16.tar.bz2 busybox-w32-a318bba199a08d65c6fb804e26d0993068a4ba16.zip |
ash: [MEMALLOC] Made grabstackblock an inline wrapper for stalloc
Upstream patch:
Date: Fri, 5 Oct 2007 23:26:45 +0800
[MEMALLOC] Made grabstackblock an inline wrapper for stalloc
The function grabstackblock is identical in semantics to stalloc within its
input constraints.
function old new delta
dotcmd 319 321 +2
grabstackblock 19 5 -14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index 2c439602a..e47c47850 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -1491,12 +1491,10 @@ sstrdup(const char *p) | |||
1491 | return memcpy(stalloc(len), p, len); | 1491 | return memcpy(stalloc(len), p, len); |
1492 | } | 1492 | } |
1493 | 1493 | ||
1494 | static void | 1494 | static inline void |
1495 | grabstackblock(size_t len) | 1495 | grabstackblock(size_t len) |
1496 | { | 1496 | { |
1497 | len = SHELL_ALIGN(len); | 1497 | stalloc(len); |
1498 | g_stacknxt += len; | ||
1499 | g_stacknleft -= len; | ||
1500 | } | 1498 | } |
1501 | 1499 | ||
1502 | static void | 1500 | static void |