Skip to content

Commit 927f026

Browse files
committed
truncate.c: make use of RVAL_DECODED
* truncate.c (sys_truncate, sys_truncate64, sys_ftruncate, sys_ftruncate64): Update for RVAL_DECODED.
1 parent ff235c8 commit 927f026

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

truncate.c

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,32 @@
22

33
SYS_FUNC(truncate)
44
{
5-
if (entering(tcp)) {
6-
printpath(tcp, tcp->u_arg[0]);
7-
tprintf(", %lu", tcp->u_arg[1]);
8-
}
9-
return 0;
5+
printpath(tcp, tcp->u_arg[0]);
6+
tprintf(", %lu", tcp->u_arg[1]);
7+
8+
return RVAL_DECODED;
109
}
1110

1211
SYS_FUNC(truncate64)
1312
{
14-
if (entering(tcp)) {
15-
printpath(tcp, tcp->u_arg[0]);
16-
printllval(tcp, ", %llu", 1);
17-
}
18-
return 0;
13+
printpath(tcp, tcp->u_arg[0]);
14+
printllval(tcp, ", %llu", 1);
15+
16+
return RVAL_DECODED;
1917
}
2018

2119
SYS_FUNC(ftruncate)
2220
{
23-
if (entering(tcp)) {
24-
printfd(tcp, tcp->u_arg[0]);
25-
tprintf(", %lu", tcp->u_arg[1]);
26-
}
27-
return 0;
21+
printfd(tcp, tcp->u_arg[0]);
22+
tprintf(", %lu", tcp->u_arg[1]);
23+
24+
return RVAL_DECODED;
2825
}
2926

3027
SYS_FUNC(ftruncate64)
3128
{
32-
if (entering(tcp)) {
33-
printfd(tcp, tcp->u_arg[0]);
34-
printllval(tcp, ", %llu", 1);
35-
}
36-
return 0;
29+
printfd(tcp, tcp->u_arg[0]);
30+
printllval(tcp, ", %llu", 1);
31+
32+
return RVAL_DECODED;
3733
}

0 commit comments

Comments
 (0)