From cdda84eaab1427b65c85d964de67911c2ce560b1 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 13 Apr 1988 12:40:48 +0000 Subject: [PATCH] minor improvement --- modules/src/alloc/st_alloc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/src/alloc/st_alloc.c b/modules/src/alloc/st_alloc.c index 17ba58cd6..8ead24486 100644 --- a/modules/src/alloc/st_alloc.c +++ b/modules/src/alloc/st_alloc.c @@ -20,7 +20,6 @@ st_alloc(phead, size, count) char *retval; if (*phead == 0) { - p = Malloc(size * count); ((_PALLOC_) p)->_A_next = 0; while (--count) { @@ -32,15 +31,12 @@ st_alloc(phead, size, count) else p = *phead; *phead = (char *) (((_PALLOC_)p)->_A_next); retval = p; - if (size >= sizeof(long)) { - q = (long *) p; - do { - *q++ = 0; - size -= sizeof(long); - } while (size >= sizeof(long)); - - p = (char *) q; + q = (long *) p; + while (size >= sizeof(long)) { + *q++ = 0; + size -= sizeof(long); } + p = (char *) q; while (size--) *p++ = 0; return retval; -- 2.34.1