minor improvement
This commit is contained in:
parent
75345fa915
commit
cdda84eaab
|
@ -20,7 +20,6 @@ st_alloc(phead, size, count)
|
||||||
char *retval;
|
char *retval;
|
||||||
|
|
||||||
if (*phead == 0) {
|
if (*phead == 0) {
|
||||||
|
|
||||||
p = Malloc(size * count);
|
p = Malloc(size * count);
|
||||||
((_PALLOC_) p)->_A_next = 0;
|
((_PALLOC_) p)->_A_next = 0;
|
||||||
while (--count) {
|
while (--count) {
|
||||||
|
@ -32,15 +31,12 @@ st_alloc(phead, size, count)
|
||||||
else p = *phead;
|
else p = *phead;
|
||||||
*phead = (char *) (((_PALLOC_)p)->_A_next);
|
*phead = (char *) (((_PALLOC_)p)->_A_next);
|
||||||
retval = p;
|
retval = p;
|
||||||
if (size >= sizeof(long)) {
|
q = (long *) p;
|
||||||
q = (long *) p;
|
while (size >= sizeof(long)) {
|
||||||
do {
|
*q++ = 0;
|
||||||
*q++ = 0;
|
size -= sizeof(long);
|
||||||
size -= sizeof(long);
|
|
||||||
} while (size >= sizeof(long));
|
|
||||||
|
|
||||||
p = (char *) q;
|
|
||||||
}
|
}
|
||||||
|
p = (char *) q;
|
||||||
|
|
||||||
while (size--) *p++ = 0;
|
while (size--) *p++ = 0;
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Reference in a new issue