summaryrefslogtreecommitdiff
path: root/libstore/kids.c
diff options
context:
space:
mode:
Diffstat (limited to 'libstore/kids.c')
-rw-r--r--libstore/kids.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libstore/kids.c b/libstore/kids.c
index 2bacfc4d..f254bcd3 100644
--- a/libstore/kids.c
+++ b/libstore/kids.c
@@ -19,7 +19,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-#include <malloc.h>
+#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
@@ -31,7 +31,7 @@ error_t
store_set_children (struct store *store,
struct store *const *children, size_t num_children)
{
- unsigned size = num_children * sizeof (struct store_run);
+ unsigned size = num_children * sizeof (struct store *);
struct store **copy = malloc (size);
if (!copy)
@@ -40,7 +40,7 @@ store_set_children (struct store *store,
if (store->children)
free (store->children);
- bcopy (children, copy, size);
+ memcpy (copy, children, size);
store->children = copy;
store->num_children = num_children;