diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-05 23:49:01 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-05 23:49:01 (EST) |
commit | faf155c311bbc180f7719d8a3f80c7863e8702f8 (patch) | |
tree | ede7d150fda9a9addecb2197a256d187068517b2 /libopkg | |
parent | ad4e27a9290b15622f6343f6ecc2b15732faa6f9 (diff) |
More dead code removal.
git-svn-id: http://opkg.googlecode.com/svn/trunk@271 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r-- | libopkg/opkg_download.c | 3 | ||||
-rw-r--r-- | libopkg/opkg_install.c | 3 | ||||
-rw-r--r-- | libopkg/pkg.c | 5 | ||||
-rw-r--r-- | libopkg/pkg_depends.h | 1 | ||||
-rw-r--r-- | libopkg/pkg_hash.c | 2 |
5 files changed, 1 insertions, 13 deletions
diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c index 70d1195..94f416c 100644 --- a/libopkg/opkg_download.c +++ b/libopkg/opkg_download.c @@ -259,9 +259,8 @@ int opkg_prepare_url_for_install(opkg_conf_t *conf, const char *url, char **name { int err = 0; pkg_t *pkg; + pkg = pkg_new(); - if (pkg == NULL) - return ENOMEM; if (str_starts_with(url, "http://") || str_starts_with(url, "ftp://")) { diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c index b3ece9c..4a1ff9a 100644 --- a/libopkg/opkg_install.c +++ b/libopkg/opkg_install.c @@ -86,9 +86,6 @@ int opkg_install_from_file(opkg_conf_t *conf, const char *filename) char *old_version, *new_version; pkg = pkg_new(); - if (pkg == NULL) { - return ENOMEM; - } err = pkg_init_from_file(pkg, filename); if (err) { diff --git a/libopkg/pkg.c b/libopkg/pkg.c index dc00186..7f7a5f3 100644 --- a/libopkg/pkg.c +++ b/libopkg/pkg.c @@ -80,11 +80,6 @@ pkg_t *pkg_new(void) pkg_t *pkg; pkg = xcalloc(1, sizeof(pkg_t)); - if (pkg == NULL) { - fprintf(stderr, "%s: out of memory\n", __FUNCTION__); - return NULL; - } - pkg_init(pkg); return pkg; diff --git a/libopkg/pkg_depends.h b/libopkg/pkg_depends.h index f77332a..18570cb 100644 --- a/libopkg/pkg_depends.h +++ b/libopkg/pkg_depends.h @@ -95,7 +95,6 @@ int pkg_conflicts(pkg_t *pkg, pkg_t *conflicts); char *pkg_depend_str(pkg_t *pkg, int index); void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg); -void freeDepends(pkg_t *pkg); int version_constraints_satisfied(depend_t * depends, pkg_t * pkg); int pkg_hash_fetch_unsatisfied_dependencies(opkg_conf_t *conf, pkg_t * pkg, pkg_vec_t *depends, char *** unresolved); pkg_vec_t * pkg_hash_fetch_conflicts(hash_table_t * hash, pkg_t * pkg); diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index 976ec96..cba3599 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -124,8 +124,6 @@ int pkg_hash_add_from_file(opkg_conf_t *conf, const char *file_name, while(*raw){ /* don't worry, we'll increment raw in the parsing function */ pkg = pkg_new(); - if (!pkg) - return -ENOMEM; if (pkg_parse_raw(pkg, &raw, src, dest) == 0) { if (!pkg->architecture) { |