str_list_push: remove unused function
[oweals/opkg-lede.git] / libopkg / pkg.h
index 1ecb59e7558ba88dd3a06cc8a5a6a3635a7aecdb..cf405b15e8148d281f6e75438f1ee800a671d978 100644 (file)
@@ -156,16 +156,16 @@ struct pkg {
           still being used within an outer loop. */
        int installed_files_ref_cnt;
 
-       int essential:1;
+       unsigned int essential:1;
 /* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */
-       int provided_by_hand:1;
+       unsigned int provided_by_hand:1;
 
        /* this flag specifies whether the package was installed to satisfy another
         * package's dependancies */
-       int auto_installed:1;
-       int is_upgrade:1;
+       unsigned int auto_installed:1;
+       unsigned int is_upgrade:1;
 
-       int arch_index:3;
+       unsigned int arch_index:3;
 
        struct blob_buf blob;
 };
@@ -179,12 +179,14 @@ void *pkg_get_raw(const pkg_t *pkg, int id);
 
 static inline int pkg_set_int(pkg_t *pkg, int id, int val)
 {
-       return (intptr_t) pkg_set_raw(pkg, id, &val, sizeof(val));
+       int *res = pkg_set_raw(pkg, id, &val, sizeof(val));
+       return res ? *res : 0;
 }
 
 static inline int pkg_get_int(const pkg_t *pkg, int id)
 {
-       return (intptr_t) pkg_get_raw(pkg, id);
+       int *ptr = pkg_get_raw(pkg, id);
+       return ptr ? *ptr : 0;
 }
 
 char *pkg_set_string(pkg_t *pkg, int id, const char *s);
@@ -233,8 +235,6 @@ int abstract_pkg_name_compare(const void *a, const void *b);
 void pkg_formatted_info(FILE * fp, pkg_t * pkg);
 void pkg_formatted_field(FILE * fp, pkg_t * pkg, const char *field);
 
-void set_flags_from_control(pkg_t * pkg);
-
 void pkg_print_status(pkg_t * pkg, FILE * file);
 str_list_t *pkg_get_installed_files(pkg_t * pkg);
 void pkg_free_installed_files(pkg_t * pkg);