summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-16 16:43:55 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-16 16:43:55 +0000
commit43ea74cce6ec1ce152c6120d64b221abed8dc27d (patch)
tree518fd3dfb8be253b8f176cfe28f18115db17b326 /lib/libalpm
parent89f0ccc3ccb6de1037ee5a74bdb18c064e5c2d01 (diff)
downloadpacman-43ea74cce6ec1ce152c6120d64b221abed8dc27d.tar.xz
reworked handle structure initialization
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/handle.c16
1 files changed, 2 insertions, 14 deletions
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);
}