From 610683e4362bfb1cd12731e70b8628dec527ccfe Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 15 Apr 2008 18:22:08 +0000 Subject: malloc -> calloc suggested by and ok oga@ --- parse.y | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index c87d475..b40e5cd 100644 --- a/parse.y +++ b/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.1 2008/03/23 15:09:21 simon Exp $ */ +/* $OpenBSD: parse.y,v 1.2 2008/04/15 18:22:08 okan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -513,8 +513,7 @@ parse_config(const char *filename, struct conf *xconf) { int errors = 0; - if ((conf = malloc(sizeof(struct conf))) == NULL) - return (-1); + XCALLOC(conf, struct conf); if ((file = pushfile(filename)) == NULL) { free(conf); -- cgit v1.2.3-2-gb3c3