pkg: coalesce soem flag members into a packed bit field
authorJo-Philipp Wich <jo@mein.io>
Fri, 10 Feb 2017 15:21:14 +0000 (16:21 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 10 Feb 2017 15:21:14 +0000 (16:21 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/pkg.h

index ad4bba5368bbaac2ba33831d35527bd67a24c8e4..15f580cb872d4420a4a9981e626c4af362ed8e2d 100644 (file)
@@ -171,15 +171,16 @@ struct pkg {
           installed_files list was being freed from an inner loop while
           still being used within an outer loop. */
        int installed_files_ref_cnt;
           installed_files list was being freed from an inner loop while
           still being used within an outer loop. */
        int installed_files_ref_cnt;
-       int essential;
        int arch_priority;
        int arch_priority;
+
+       int essential:1;
 /* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */
 /* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */
-       int provided_by_hand;
+       int provided_by_hand:1;
 
        /* this flag specifies whether the package was installed to satisfy another
         * package's dependancies */
 
        /* this flag specifies whether the package was installed to satisfy another
         * package's dependancies */
-       int auto_installed;
-       int is_upgrade;
+       int auto_installed:1;
+       int is_upgrade:1;
 };
 
 pkg_t *pkg_new(void);
 };
 
 pkg_t *pkg_new(void);