Skip to content

Commit bfd93dc

Browse files
committed
db: generate 32-bit comparisons on 64-bit architectures if SCMP_CMP_32BIT is set
Signed-off-by: James Henstridge <james.henstridge@canonical.com>
1 parent f0a97ac commit bfd93dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/db.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ static struct db_sys_list *_db_rule_gen(const struct arch_def *arch,
19971997
struct db_sys_list *s_new;
19981998
const struct db_api_arg *chain = rule->args;
19991999
struct db_arg_chain_tree *prev_nodes[4] = { NULL, };
2000-
bool is_32bit = arch->size == ARCH_SIZE_32;
2000+
bool arch_32bit = arch->size == ARCH_SIZE_32;
20012001
bool tf_flag = false;
20022002

20032003
s_new = zmalloc(sizeof(*s_new));
@@ -2007,7 +2007,7 @@ static struct db_sys_list *_db_rule_gen(const struct arch_def *arch,
20072007
s_new->valid = true;
20082008
/* run through the argument chain */
20092009
for (iter = 0; iter < ARG_COUNT_MAX; iter++) {
2010-
if (is_32bit) {
2010+
if (arch_32bit || chain[iter].is_32bit) {
20112011
if (_db_rule_gen_arg_32(s_new, arch, &chain[iter],
20122012
prev_nodes, &tf_flag) < 0)
20132013
goto gen_failure;

0 commit comments

Comments
 (0)