From c723fb3996c89cd433d33fdb20c28527bc050c88 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 10 Feb 2017 16:21:14 +0100 Subject: [PATCH 1/1] pkg: coalesce soem flag members into a packed bit field Signed-off-by: Jo-Philipp Wich --- libopkg/pkg.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libopkg/pkg.h b/libopkg/pkg.h index ad4bba5..15f580c 100644 --- a/libopkg/pkg.h +++ b/libopkg/pkg.h @@ -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; - int essential; int arch_priority; + + 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; + int provided_by_hand:1; /* 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); -- 2.25.1