aboutsummaryrefslogtreecommitdiffstats
path: root/xmalloc.c
diff options
context:
space:
mode:
authoroga2008-04-16 13:38:09 +0000
committeroga2008-04-16 13:38:09 +0000
commit579efe92d1c484a6d8b9399b2abdb6440f9e92ea (patch)
tree54a68e890f6637336f92a6cd965818e3b14cafe8 /xmalloc.c
parent02211e5b89f2fd8670b150d7892f56d0f6dba351 (diff)
downloadcwm-579efe92d1c484a6d8b9399b2abdb6440f9e92ea.tar.gz
Replace a few leftover calls to strdup and calloc with xstrdup and xcalloc
respectively. ok okan.
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 7d763c3..e454c24 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: xmalloc.c,v 1.2 2008/01/11 16:06:44 oga Exp $
+ * $Id: xmalloc.c,v 1.3 2008/04/16 13:38:09 oga Exp $
*/
#include "headers.h"
@@ -33,11 +33,11 @@ xmalloc(size_t siz)
}
void *
-xcalloc(size_t siz)
+xcalloc(size_t no, size_t siz)
{
void *p;
- if ((p = calloc(1, siz)) == NULL)
+ if ((p = calloc(no, siz)) == NULL)
err(1, "calloc");
return (p);