diff options
Diffstat (limited to 'lib/libalpm/group.c')
-rw-r--r-- | lib/libalpm/group.c | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c index 398c2588..47458df2 100644 --- a/lib/libalpm/group.c +++ b/lib/libalpm/group.c @@ -21,7 +21,6 @@ #include "config.h" #include <stdlib.h> -#include <stdio.h> #include <string.h> /* libalpm */ @@ -31,22 +30,18 @@ #include "log.h" #include "alpm.h" -pmgrp_t *_alpm_grp_new(const char *name) +alpm_group_t *_alpm_group_new(const char *name) { - pmgrp_t* grp; + alpm_group_t* grp; - ALPM_LOG_FUNC; + CALLOC(grp, 1, sizeof(alpm_group_t), return NULL); + STRDUP(grp->name, name, free(grp); return NULL); - CALLOC(grp, 1, sizeof(pmgrp_t), RET_ERR(PM_ERR_MEMORY, NULL)); - STRDUP(grp->name, name, RET_ERR(PM_ERR_MEMORY, NULL)); - - return(grp); + return grp; } -void _alpm_grp_free(pmgrp_t *grp) +void _alpm_group_free(alpm_group_t *grp) { - ALPM_LOG_FUNC; - if(grp == NULL) { return; } @@ -57,23 +52,4 @@ void _alpm_grp_free(pmgrp_t *grp) FREE(grp); } -const char SYMEXPORT *alpm_grp_get_name(const pmgrp_t *grp) -{ - ALPM_LOG_FUNC; - - /* Sanity checks */ - ASSERT(grp != NULL, return(NULL)); - - return grp->name; -} - -alpm_list_t SYMEXPORT *alpm_grp_get_pkgs(const pmgrp_t *grp) -{ - ALPM_LOG_FUNC; - - /* Sanity checks */ - ASSERT(grp != NULL, return(NULL)); - - return grp->packages; -} /* vim: set ts=2 sw=2 noet: */ |