From: Eugene Syromyatnikov Date: Tue, 3 Sep 2019 11:55:53 +0000 (+0200) Subject: clone: fix print_tls_arg on x86 X-Git-Tag: v5.3~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58de2781edd8940fc40b1b622604d3dee83b69d5;p=strace clone: fix print_tls_arg on x86 When strace is built for (32-bit) x86, it has HAVE_STRUCT_USER_DESC and SUPPORTED_PERSONALITIES == 1, which led to execution of the both branches. Simplify the logic by including the SUPPORTED_PERSONALITIES into the condition. * clone.c (print_tls_arg): Include SUPPORTED_PERSONALITIES into the "if" condition. --- diff --git a/clone.c b/clone.c index 91d515de..7270cee9 100644 --- a/clone.c +++ b/clone.c @@ -60,15 +60,11 @@ static void print_tls_arg(struct tcb *const tcp, const kernel_ulong_t addr) { #ifdef HAVE_STRUCT_USER_DESC -# if SUPPORTED_PERSONALITIES > 1 - if (current_personality == 1) -# endif + if ((SUPPORTED_PERSONALITIES == 1) || (current_personality == 1)) { print_user_desc(tcp, addr, USER_DESC_BOTH); } -# if SUPPORTED_PERSONALITIES > 1 else -# endif #endif /* HAVE_STRUCT_USER_DESC */ { printaddr(addr);