]> granicus.if.org Git - strace/commitdiff
utimes.c: make use of RVAL_DECODED
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 16 Jul 2015 21:21:09 +0000 (21:21 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 16 Jul 2015 22:57:52 +0000 (22:57 +0000)
* utimes.c (decode_utimes): Change to return void.
Update for RVAL_DECODED.
(sys_utimes, sys_futimesat, sys_utimensat, sys_osf_utimes):
Update callers.  Update for RVAL_DECODED.

utimes.c

index 4c995a593b10aad1a85ec4672dbe9a13adb725ea..e3a93392f4df25ccff22d0be7dc431a1de7d22ef 100644 (file)
--- a/utimes.c
+++ b/utimes.c
@@ -1,58 +1,56 @@
 #include "defs.h"
 
-static int
+static void
 decode_utimes(struct tcb *tcp, int offset, int special)
 {
-       if (entering(tcp)) {
-               printpath(tcp, tcp->u_arg[offset]);
+       printpath(tcp, tcp->u_arg[offset]);
+       tprints(", ");
+       if (tcp->u_arg[offset + 1] == 0)
+               tprints("NULL");
+       else {
+               tprints("[");
+               printtv_bitness(tcp, tcp->u_arg[offset + 1],
+                               BITNESS_CURRENT, special);
                tprints(", ");
-               if (tcp->u_arg[offset + 1] == 0)
-                       tprints("NULL");
-               else {
-                       tprints("[");
-                       printtv_bitness(tcp, tcp->u_arg[offset + 1],
-                                       BITNESS_CURRENT, special);
-                       tprints(", ");
-                       printtv_bitness(tcp, tcp->u_arg[offset + 1]
-                                       + sizeof(struct timeval),
-                                       BITNESS_CURRENT, special);
-                       tprints("]");
-               }
+               printtv_bitness(tcp, tcp->u_arg[offset + 1]
+                               + sizeof(struct timeval),
+                               BITNESS_CURRENT, special);
+               tprints("]");
        }
-       return 0;
 }
 
 SYS_FUNC(utimes)
 {
-       return decode_utimes(tcp, 0, 0);
+       decode_utimes(tcp, 0, 0);
+
+       return RVAL_DECODED;
 }
 
 SYS_FUNC(futimesat)
 {
-       if (entering(tcp))
-               print_dirfd(tcp, tcp->u_arg[0]);
-       return decode_utimes(tcp, 1, 0);
+       print_dirfd(tcp, tcp->u_arg[0]);
+       decode_utimes(tcp, 1, 0);
+
+       return RVAL_DECODED;
 }
 
 SYS_FUNC(utimensat)
 {
-       if (entering(tcp)) {
-               print_dirfd(tcp, tcp->u_arg[0]);
-               decode_utimes(tcp, 1, 1);
-               tprints(", ");
-               printflags(at_flags, tcp->u_arg[3], "AT_???");
-       }
-       return 0;
+       print_dirfd(tcp, tcp->u_arg[0]);
+       decode_utimes(tcp, 1, 1);
+       tprints(", ");
+       printflags(at_flags, tcp->u_arg[3], "AT_???");
+
+       return RVAL_DECODED;
 }
 
 #ifdef ALPHA
 SYS_FUNC(osf_utimes)
 {
-       if (entering(tcp)) {
-               printpath(tcp, tcp->u_arg[0]);
-               tprints(", ");
-               printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32,  0);
-       }
-       return 0;
+       printpath(tcp, tcp->u_arg[0]);
+       tprints(", ");
+       printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32,  0);
+
+       return RVAL_DECODED;
 }
 #endif /* ALPHA */