diff options
author | Roland McGrath <roland@gnu.org> | 2003-04-05 00:34:07 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2003-04-05 00:34:07 +0000 |
commit | d0f534e9a19823a3fa473aaeb61d37394b6bb753 (patch) | |
tree | 4c1f48f35fe43d6a3d72681b81c1b37ebc3d4cc2 /stdio-common/reg-printf.c | |
parent | beb03cee27a133e3fd34795e32d6d51c7b7b4d4d (diff) | |
download | glibc-d0f534e9a19823a3fa473aaeb61d37394b6bb753.tar.gz glibc-d0f534e9a19823a3fa473aaeb61d37394b6bb753.tar.xz glibc-d0f534e9a19823a3fa473aaeb61d37394b6bb753.zip |
* stdio-common/reg-printf.c (__register_printf_function): Calloc
instead of malloc __printf_arginfo_table and __printf_function_table. Reported by John Reiser <jreiser@BitWagon.com>.
Diffstat (limited to 'stdio-common/reg-printf.c')
-rw-r--r-- | stdio-common/reg-printf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stdio-common/reg-printf.c b/stdio-common/reg-printf.c index 672652ab20..826035ca6d 100644 --- a/stdio-common/reg-printf.c +++ b/stdio-common/reg-printf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,1996,1997,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,7 +46,7 @@ __register_printf_function (spec, converter, arginfo) if (__printf_function_table == NULL) { __printf_arginfo_table = (printf_arginfo_function **) - malloc ((UCHAR_MAX + 1) * sizeof (void *) * 2); + calloc (UCHAR_MAX + 1, sizeof (void *) * 2); if (__printf_arginfo_table == NULL) return -1; __printf_function_table = (printf_function **) |