[uClibc-cvs] uClibc/libc/stdlib/malloc-standard calloc.c,1.1,1.2

Erik Andersen andersen at uclibc.org
Tue Dec 30 10:57:19 UTC 2003


Update of /var/cvs/uClibc/libc/stdlib/malloc-standard
In directory nail:/tmp/cvs-serv6231/libc/stdlib/malloc-standard

Modified Files:
	calloc.c 
Log Message:
Fix the manditory typo in my last minute untested fix.
 -Erik


Index: calloc.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdlib/malloc-standard/calloc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- calloc.c	30 Dec 2003 10:40:49 -0000	1.1
+++ calloc.c	30 Dec 2003 10:57:16 -0000	1.2
@@ -29,7 +29,7 @@
 
     /* guard vs integer overflow, but allow nmemb
      * to fall through and call malloc(0) */
-    size=lsize * nmemb;
+    size = n_elements * elem_size;
     if (n_elements && elem_size != (size / n_elements)) {
 	__set_errno(ENOMEM);
 	return NULL;




More information about the uClibc-cvs mailing list