commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hurd/libstore kids.c ChangeLog


From: Neal H. Walfield
Subject: hurd/libstore kids.c ChangeLog
Date: Sun, 03 Nov 2002 14:27:37 -0500

CVSROOT:        /cvsroot/hurd
Module name:    hurd
Changes by:     Neal H. Walfield <address@hidden>       02/11/03 14:27:36

Modified files:
        libstore       : kids.c ChangeLog 

Log message:
        2002-11-03  Neal H. Walfield  <address@hidden>
        
        * 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 <address@hidden>.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd/libstore/kids.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd/libstore/ChangeLog.diff?tr1=1.92&tr2=1.93&r1=text&r2=text

Patches:
Index: hurd/libstore/ChangeLog
diff -u hurd/libstore/ChangeLog:1.92 hurd/libstore/ChangeLog:1.93
--- hurd/libstore/ChangeLog:1.92        Tue Jun 11 17:43:42 2002
+++ hurd/libstore/ChangeLog     Sun Nov  3 14:27:36 2002
@@ -1,3 +1,12 @@
+2002-11-03  Neal H. Walfield  <address@hidden>
+
+       * 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 <address@hidden>.
+
 2002-06-07  Roland McGrath  <address@hidden>
 
        * store.h (struct store_enc): Use loff_t instead of off_t.
Index: hurd/libstore/kids.c
diff -u hurd/libstore/kids.c:1.9 hurd/libstore/kids.c:1.10
--- hurd/libstore/kids.c:1.9    Wed May  8 05:24:36 2002
+++ hurd/libstore/kids.c        Sun Nov  3 14:27:36 2002
@@ -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 @@
 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 @@
   if (store->children)
     free (store->children);
 
-  bcopy (children, copy, size);
+  memcpy (copy, children, size);
   store->children = copy;
   store->num_children = num_children;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]