From 1fdc2cac54c34caf9c196799cf63add009523c9a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 28 Feb 2017 23:53:41 +0100 Subject: [PATCH] pkg: mark bit fields in pkg_t unsigned Qualify the bit field type as unsigned int to ensure that set flags are interpreted as "1" and not "-1". Signed-off-by: Jo-Philipp Wich --- libopkg/pkg.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libopkg/pkg.h b/libopkg/pkg.h index 1299d68..04ca85e 100644 --- a/libopkg/pkg.h +++ b/libopkg/pkg.h @@ -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; }; -- 2.30.2