summary refs log tree commit diff
path: root/parse.y
diff options
context:
space:
mode:
authorokan <okan>2008-04-15 18:22:08 +0000
committerokan <okan>2008-04-15 18:22:08 +0000
commitfe80d400634a3b5e38ad8d1e9b5a3146306305d2 (patch)
treea80169fb71ab2170983910664f808f095ebaaa2f /parse.y
parent343ec1bb4fa42eabd35222b4dc1bd53fc7690026 (diff)
downloadcwm-fe80d400634a3b5e38ad8d1e9b5a3146306305d2.tar.gz
cwm-fe80d400634a3b5e38ad8d1e9b5a3146306305d2.tar.xz
cwm-fe80d400634a3b5e38ad8d1e9b5a3146306305d2.zip
malloc -> calloc
suggested by and ok oga@
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index bb5e44c..7322bbe 100644
--- a/parse.y
+++ b/parse.y
@@ -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);