We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 071193f commit bc863e9Copy full SHA for bc863e9
getcpu.c
@@ -3,20 +3,11 @@
3
SYS_FUNC(getcpu)
4
{
5
if (exiting(tcp)) {
6
- unsigned u;
7
- if (tcp->u_arg[0] == 0)
8
- tprints("NULL, ");
9
- else if (umove(tcp, tcp->u_arg[0], &u) < 0)
10
- tprintf("%#lx, ", tcp->u_arg[0]);
11
- else
12
- tprintf("[%u], ", u);
13
- if (tcp->u_arg[1] == 0)
14
15
- else if (umove(tcp, tcp->u_arg[1], &u) < 0)
16
- tprintf("%#lx, ", tcp->u_arg[1]);
17
18
19
- tprintf("%#lx", tcp->u_arg[2]);
+ printnum_int(tcp, tcp->u_arg[0], "%u");
+ tprints(", ");
+ printnum_int(tcp, tcp->u_arg[1], "%u");
+ printaddr(tcp->u_arg[2]);
20
}
21
return 0;
22
0 commit comments