[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
- Re: [PATCH v2 32/48] bsd-user: style tweak: remove spacing after '*' and add after }, (continued)
- [PATCH v2 28/48] bsd-user: style tweak: comments, imp, 2021/04/24
- [PATCH v2 16/48] bsd-user: style tweak: Put {} around all if/else/for statements, imp, 2021/04/24
- [PATCH v2 18/48] bsd-user: style tweak: Use preferred block comments, imp, 2021/04/24
- [PATCH v2 33/48] bsd-user: style tweak: Use preferred block comments, imp, 2021/04/24
- [PATCH v2 37/48] bsd-user: style tweak: don't assign in if statements, imp, 2021/04/24
- [PATCH v2 41/48] bsd-user: style tweak: don't assign in if statements,
imp <=
- [PATCH v2 40/48] bsd-user: style tweak: Use preferred block comments, imp, 2021/04/24
- [PATCH v2 43/48] bsd-user: style tweak: fold long lines, imp, 2021/04/24
- [PATCH v2 29/48] bsd-user: style tweak: use {} correctly, imp, 2021/04/24
- [PATCH v2 23/48] bsd-user: introduce host_os.h for bsd-specific code and defaults, imp, 2021/04/24
- [PATCH v2 45/48] bsd-user: style tweak: Use preferred {} in if/else statements., imp, 2021/04/24