summaryrefslogtreecommitdiff
path: root/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'libstore')
-rw-r--r--libstore/ChangeLog9
-rw-r--r--libstore/kids.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/libstore/ChangeLog b/libstore/ChangeLog
index ab4b8c59..955d75b5 100644
--- a/libstore/ChangeLog
+++ b/libstore/ChangeLog
@@ -1,3 +1,12 @@
+2002-11-03 Neal H. Walfield <neal@cs.uml.edu>
+
+ * kids.c: Do not include <malloc.h>.
+ Include <stdlib.h>.
+ (store_set_children): Use memcpy, not bcopy.
+ Calculate SIZE correctly: STORE->children is a struct store **,
+ not a struct store_run *.
+ Reported by Moritz Schulte <moritz@duesseldorf.ccc.de>.
+
2002-06-07 Roland McGrath <roland@frob.com>
* store.h (struct store_enc): Use loff_t instead of off_t.
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;