summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-08-20 12:48:18 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2011-08-23 12:53:01 +0200
commit5d64581e106f47c474707001f924ee15ef22830b (patch)
tree360b596fa1911aae10f6b0293f9dee935c496bf9 /io.c
parent6b6ed5d669c04fb949dfc88ed0571e3db0d11571 (diff)
downloadstrace-5d64581e106f47c474707001f924ee15ef22830b.tar.gz
strace-5d64581e106f47c474707001f924ee15ef22830b.tar.bz2
strace-5d64581e106f47c474707001f924ee15ef22830b.tar.xz
Improve code readability by avoiding assignments inside if()
* desc.c (decode_select): Move assignment out of if() condition. * file.c (sprinttime): Likewise. (sys_getdirentries): Likewise. * io.c (sys_ioctl): Likewise. * strace.c (test_ptrace_setoptions_followfork): Likewise. (main): Likewise. (proc_open): Likewise. (detach): Likewise. (proc_poll): Likewise. (trace): Likewise. * syscall.c (qualify): Likewise. (sys_indir): Likewise. * test/procpollable.c (main): Likewise. * test/sfd.c (main): Likewise. * time.c (printtv_bitness): Likewise. (sprinttv): Likewise. (print_timespec): Likewise. (void sprint_timespec): Likewise. (printitv_bitness): Likewise. * util.c (dumpstr): Likewise. (umovestr): Likewise. (fixvfork): Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 7f2f243..e3cad66 100644
--- a/io.c
+++ b/io.c
@@ -434,8 +434,8 @@ sys_ioctl(struct tcb *tcp)
ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
}
else {
- int ret;
- if (!(ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2])))
+ int ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ if (!ret)
tprintf(", %#lx", tcp->u_arg[2]);
else
return ret - 1;