summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/calloc.c
diff options
context:
space:
mode:
authorpat <>2005-03-30 18:51:49 +0000
committerpat <>2005-03-30 18:51:49 +0000
commit894b6ab0099e7d9ca2ad9acb75246cd0a4542167 (patch)
treef9fb8e9324f6cbdc10d72cab8b889d470252465a /src/lib/libc/stdlib/calloc.c
parent162f8b042bf31ab94714a6f194e9836c08c085f5 (diff)
downloadopenbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.gz
openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.bz2
openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.zip
ansi + de-register
ok otto deraadt
Diffstat (limited to 'src/lib/libc/stdlib/calloc.c')
-rw-r--r--src/lib/libc/stdlib/calloc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libc/stdlib/calloc.c b/src/lib/libc/stdlib/calloc.c
index b0703cc884..7aabed235f 100644
--- a/src/lib/libc/stdlib/calloc.c
+++ b/src/lib/libc/stdlib/calloc.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#if defined(LIBC_SCCS) && !defined(lint) 30#if defined(LIBC_SCCS) && !defined(lint)
31static char *rcsid = "$OpenBSD: calloc.c,v 1.8 2003/06/02 20:18:37 millert Exp $"; 31static char *rcsid = "$OpenBSD: calloc.c,v 1.9 2005/03/30 18:51:49 pat Exp $";
32#endif /* LIBC_SCCS and not lint */ 32#endif /* LIBC_SCCS and not lint */
33 33
34#include <stdlib.h> 34#include <stdlib.h>
@@ -37,11 +37,9 @@ static char *rcsid = "$OpenBSD: calloc.c,v 1.8 2003/06/02 20:18:37 millert Exp $
37#include <errno.h> 37#include <errno.h>
38 38
39void * 39void *
40calloc(num, size) 40calloc(size_t num, size_t size)
41 size_t num;
42 register size_t size;
43{ 41{
44 register void *p; 42 void *p;
45 43
46 if (num && size && SIZE_T_MAX / num < size) { 44 if (num && size && SIZE_T_MAX / num < size) {
47 errno = ENOMEM; 45 errno = ENOMEM;