diff options
Diffstat (limited to 'misc/tsearch.c')
-rw-r--r-- | misc/tsearch.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/misc/tsearch.c b/misc/tsearch.c index c5af3ec..0cf854b 100644 --- a/misc/tsearch.c +++ b/misc/tsearch.c @@ -359,8 +359,7 @@ __tdelete (const void *key, void **vrootp, __compar_fn_t compar) node **newstack; stacksize += 20; newstack = alloca (sizeof (node *) * stacksize); - memcpy (newstack, nodestack, sp * sizeof (node *)); - nodestack = newstack; + nodestack = memcpy (newstack, nodestack, sp * sizeof (node *)); } nodestack[sp++] = rootp; @@ -398,8 +397,7 @@ __tdelete (const void *key, void **vrootp, __compar_fn_t compar) node **newstack; stacksize += 20; newstack = alloca (sizeof (node *) * stacksize); - memcpy (newstack, nodestack, sp * sizeof (node *)); - nodestack = newstack; + nodestack = memcpy (newstack, nodestack, sp * sizeof (node *)); } nodestack[sp++] = parent; parent = up; |