qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 41/48] bsd-user: style tweak: don't assign in if statements


From: imp
Subject: [PATCH v2 41/48] bsd-user: style tweak: don't assign in if statements
Date: Sat, 24 Apr 2021 10:00:09 -0600

From: Warner Losh <imp@bsdimp.com>

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/strace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bsd-user/strace.c b/bsd-user/strace.c
index aa4ab8cee7..94f2b59565 100644
--- a/bsd-user/strace.c
+++ b/bsd-user/strace.c
@@ -80,7 +80,8 @@ static void print_execve(const struct syscallname *name, 
abi_long arg1,
         if (!arg_addr) {
             break;
         }
-        if ((s = lock_user_string(arg_addr))) {
+        s = lock_user_string(arg_addr);
+        if (s) {
             gemu_log("\"%s\",", s);
             unlock_user(s, arg_addr, 0);
         }
-- 
2.22.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]