Redundant code in trace_syscall_exiting()
Dmitry V. Levin
ldv at altlinux.org
Wed Mar 9 02:58:12 UTC 2016
On Tue, Mar 08, 2016 at 10:55:47AM +0530, haris iqbal wrote:
> if (tcp->qual_flg & QUAL_RAW) {
> /* sys_res = printargs(tcp); - but it's nop on sysexit */
> } else {
> /* FIXME: not_failing_only (IOW, option -z) is broken:
> * failure of syscall is known only after syscall return.
> * Thus we end up with something like this on, say, ENOENT:
> * open("doesnt_exist", O_RDONLY <unfinished ...>
> * {next syscall decode}
> * whereas the intended result is that open(...) line
> * is not shown at all.
> */
> if (not_failing_only && tcp->u_error)
> goto ret; /* ignore failed syscalls */
> if (tcp->sys_func_rval & RVAL_DECODED)
> sys_res = tcp->sys_func_rval;
> else
> sys_res = tcp->s_ent->sys_func(tcp);
> }
>
> This condition check in if seems redundant. Should I remove it with
The code you are talking about is a comment.
> if (!(tcp->qual_flg & QUAL_RAW))
Why do you think this would be any different from the above?
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160309/dc8f0e20/attachment.bin>
More information about the Strace-devel
mailing list