From: Dmitry V. Levin Date: Mon, 20 Jul 2015 17:30:38 +0000 (+0000) Subject: chmod.c: make use of RVAL_DECODED X-Git-Tag: v4.11~357 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4d45720d03e5bad080af6c50db98bfae3649021;p=strace chmod.c: make use of RVAL_DECODED * chmod.c (decode_chmod): Change to return void. (sys_chmod, sys_fchmodat): Update callers. Update for RVAL_DECODED. (sys_fchmod): Update for RVAL_DECODED. --- diff --git a/chmod.c b/chmod.c index 21ce1154..83741c9e 100644 --- a/chmod.c +++ b/chmod.c @@ -1,32 +1,31 @@ #include "defs.h" -static int -decode_chmod(struct tcb *tcp, int offset) +static void +decode_chmod(struct tcb *tcp, const int offset) { - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[offset]); - tprintf(", %#lo", tcp->u_arg[offset + 1]); - } - return 0; + printpath(tcp, tcp->u_arg[offset]); + tprintf(", %#lo", tcp->u_arg[offset + 1]); } SYS_FUNC(chmod) { - return decode_chmod(tcp, 0); + decode_chmod(tcp, 0); + + return RVAL_DECODED; } SYS_FUNC(fchmodat) { - if (entering(tcp)) - print_dirfd(tcp, tcp->u_arg[0]); - return decode_chmod(tcp, 1); + print_dirfd(tcp, tcp->u_arg[0]); + decode_chmod(tcp, 1); + + return RVAL_DECODED; } SYS_FUNC(fchmod) { - if (entering(tcp)) { - printfd(tcp, tcp->u_arg[0]); - tprintf(", %#lo", tcp->u_arg[1]); - } - return 0; + printfd(tcp, tcp->u_arg[0]); + tprintf(", %#lo", tcp->u_arg[1]); + + return RVAL_DECODED; }