qed: Fix static checker warning
[linux/fpc-iii.git] / tools / perf / trace / beauty / signum.c
blobbde18a53f090945f9edd7ed517762cc4f5a8de7d
1 // SPDX-License-Identifier: GPL-2.0
2 #include <signal.h>
4 static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscall_arg *arg)
6 int sig = arg->val;
8 switch (sig) {
9 #define P_SIGNUM(n) case SIG##n: return scnprintf(bf, size, #n)
10 P_SIGNUM(HUP);
11 P_SIGNUM(INT);
12 P_SIGNUM(QUIT);
13 P_SIGNUM(ILL);
14 P_SIGNUM(TRAP);
15 P_SIGNUM(ABRT);
16 P_SIGNUM(BUS);
17 P_SIGNUM(FPE);
18 P_SIGNUM(KILL);
19 P_SIGNUM(USR1);
20 P_SIGNUM(SEGV);
21 P_SIGNUM(USR2);
22 P_SIGNUM(PIPE);
23 P_SIGNUM(ALRM);
24 P_SIGNUM(TERM);
25 P_SIGNUM(CHLD);
26 P_SIGNUM(CONT);
27 P_SIGNUM(STOP);
28 P_SIGNUM(TSTP);
29 P_SIGNUM(TTIN);
30 P_SIGNUM(TTOU);
31 P_SIGNUM(URG);
32 P_SIGNUM(XCPU);
33 P_SIGNUM(XFSZ);
34 P_SIGNUM(VTALRM);
35 P_SIGNUM(PROF);
36 P_SIGNUM(WINCH);
37 P_SIGNUM(IO);
38 P_SIGNUM(PWR);
39 P_SIGNUM(SYS);
40 #ifdef SIGEMT
41 P_SIGNUM(EMT);
42 #endif
43 #ifdef SIGSTKFLT
44 P_SIGNUM(STKFLT);
45 #endif
46 #ifdef SIGSWI
47 P_SIGNUM(SWI);
48 #endif
49 default: break;
52 return scnprintf(bf, size, "%#x", sig);
55 #define SCA_SIGNUM syscall_arg__scnprintf_signum