Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/graph.h')
-rw-r--r--lib/libalpm/graph.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/libalpm/graph.h b/lib/libalpm/graph.h
index c82e6811..07986f66 100644
--- a/lib/libalpm/graph.h
+++ b/lib/libalpm/graph.h
@@ -1,7 +1,7 @@
/*
* graph.h - helpful graph structure and setup/teardown methods
*
- * Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -21,8 +21,7 @@
#include <sys/types.h> /* off_t */
#include "alpm_list.h"
-#include "util.h" /* MALLOC() */
-#include "alpm.h"
+#include "util.h" /* CALLOC() */
struct __pmgraph_t {
char state; /* 0: untouched, -1: entered, other: leaving time */
@@ -38,15 +37,7 @@ static pmgraph_t *_alpm_graph_new(void)
{
pmgraph_t *graph = NULL;
- MALLOC(graph, sizeof(pmgraph_t), RET_ERR(PM_ERR_MEMORY, NULL));
-
- if(graph) {
- graph->state = 0;
- graph->data = NULL;
- graph->parent = NULL;
- graph->children = NULL;
- graph->childptr = NULL;
- }
+ CALLOC(graph, 1, sizeof(pmgraph_t), RET_ERR(PM_ERR_MEMORY, NULL));
return(graph);
}