From 43ea74cce6ec1ce152c6120d64b221abed8dc27d Mon Sep 17 00:00:00 2001
From: Aurelien Foret <aurelien@archlinux.org>
Date: Sat, 16 Apr 2005 16:43:55 +0000
Subject: reworked handle structure initialization

---
 lib/libalpm/handle.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

(limited to 'lib/libalpm')

diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 1705ae40..883d943a 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -49,6 +49,8 @@ pmhandle_t *handle_new()
 		RET_ERR(PM_ERR_MEMORY, NULL);
 	}
 
+	memset(handle, 0, sizeof(pmhandle_t));
+
 	/* see if we're root or not */
 	handle->uid = geteuid();
 	if(!handle->uid && getenv("FAKEROOTKEY")) {
@@ -63,20 +65,6 @@ pmhandle_t *handle_new()
 		handle->access = PM_ACCESS_RO;
 	}
 
-	handle->trans = NULL;
-
-	handle->db_local = NULL;
-	handle->dbs_sync = NULL;
-
-	handle->logfd = NULL;
-
-	handle->root = NULL;
-	handle->dbpath = NULL;
-	handle->logfile = NULL;
-	handle->noupgrade = NULL;
-	handle->ignorepkg = NULL;
-	handle->usesyslog = 0;
-
 	return(handle);
 }
 
-- 
cgit v1.2.3-70-g09d2