summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/group.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-03-02 20:02:35 +0100
committerAurelien Foret <aurelien@archlinux.org>2006-03-02 20:02:35 +0100
commit3eebe8fc2b641737c0581066034f29ce573900d5 (patch)
tree786427248226551938abe1896de30cd3bf7cde57 /lib/libalpm/group.c
parent79f4b5acf407e6fdf054de323e11c9b5a4f97580 (diff)
downloadpacman-3eebe8fc2b641737c0581066034f29ce573900d5.tar.gz
pacman-3eebe8fc2b641737c0581066034f29ce573900d5.tar.xz
code cleanup
Diffstat (limited to 'lib/libalpm/group.c')
-rw-r--r--lib/libalpm/group.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c
index a77a8eef..af769575 100644
--- a/lib/libalpm/group.c
+++ b/lib/libalpm/group.c
@@ -25,7 +25,10 @@
#include <string.h>
/* pacman */
#include "util.h"
+#include "error.h"
+#include "log.h"
#include "group.h"
+#include "alpm.h"
pmgrp_t *_alpm_grp_new()
{
@@ -33,7 +36,9 @@ pmgrp_t *_alpm_grp_new()
grp = (pmgrp_t *)malloc(sizeof(pmgrp_t));
if(grp == NULL) {
- return(NULL);
+ _alpm_log(PM_LOG_ERROR, "malloc failure: could not allocate %d bytes",
+ sizeof(pmgrp_t));
+ RET_ERR(PM_ERR_MEMORY, NULL);
}
grp->name[0] = '\0';