diff options
author | Dan McGee <dan@archlinux.org> | 2008-05-13 19:03:54 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-13 19:03:54 -0500 |
commit | dd98aa8564a21ed43782704bf9feb5b2b114825f (patch) | |
tree | 685c35186dc19109865957abc5f384dd606d3df9 /lib/libalpm/package.c | |
parent | a422f6e39c9c60b89269c2b09e697a9eb142b904 (diff) | |
download | pacman-dd98aa8564a21ed43782704bf9feb5b2b114825f.tar.xz |
Simplify _alpm_pkg_new()
Any real call of this function doesn't specify a name or version ahead of
time, so just kill that functionality off. Now to remove those dummy
packages...
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r-- | lib/libalpm/package.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 86596165..14c1df13 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -680,7 +680,7 @@ int _alpm_versioncmp(const char *a, const char *b) } -pmpkg_t *_alpm_pkg_new(const char *name, const char *version) +pmpkg_t *_alpm_pkg_new(void) { pmpkg_t* pkg; @@ -688,14 +688,6 @@ pmpkg_t *_alpm_pkg_new(const char *name, const char *version) CALLOC(pkg, 1, sizeof(pmpkg_t), RET_ERR(PM_ERR_MEMORY, NULL)); - if(name) { - STRDUP(pkg->name, name, RET_ERR(PM_ERR_MEMORY, pkg)); - } - - if(version) { - STRDUP(pkg->version, version, RET_ERR(PM_ERR_MEMORY, pkg)); - } - return(pkg); } |