Convert sigev_value to XLAT form
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 5 Feb 2014 01:46:10 +0000 (01:46 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 5 Feb 2014 01:46:10 +0000 (01:46 +0000)
* time.c (sigev_value): Convert to XLAT form.
(printsigevent32, printsigevent): Update use of sigev_value.

time.c

diff --git a/time.c b/time.c
index 3c50b8095e7bfa4ed2114969b5ee1df998724264..8975cc7570d9323b13d55595787d1e3f0082f4d7 100644 (file)
--- a/time.c
+++ b/time.c
@@ -757,10 +757,10 @@ sys_clock_adjtime(struct tcb *tcp)
 # define SIGEV_THREAD_ID 4
 #endif
 static const struct xlat sigev_value[] = {
-       { SIGEV_SIGNAL+1, "SIGEV_SIGNAL" },
-       { SIGEV_NONE+1, "SIGEV_NONE" },
-       { SIGEV_THREAD+1, "SIGEV_THREAD" },
-       { SIGEV_THREAD_ID+1, "SIGEV_THREAD_ID" },
+       XLAT(SIGEV_SIGNAL),
+       XLAT(SIGEV_NONE),
+       XLAT(SIGEV_THREAD),
+       XLAT(SIGEV_THREAD_ID),
        { 0, NULL }
 };
 
@@ -789,7 +789,7 @@ printsigevent32(struct tcb *tcp, long arg)
                        tprintf("%s, ", signame(sev.sigev_signo));
                else
                        tprintf("%u, ", sev.sigev_signo);
-               printxval(sigev_value, sev.sigev_notify + 1, "SIGEV_???");
+               printxval(sigev_value, sev.sigev_notify, "SIGEV_???");
                tprints(", ");
                if (sev.sigev_notify == SIGEV_THREAD_ID)
                        tprintf("{%d}", sev.un.tid);
@@ -823,7 +823,7 @@ printsigevent(struct tcb *tcp, long arg)
                        tprintf("%s, ", signame(sev.sigev_signo));
                else
                        tprintf("%u, ", sev.sigev_signo);
-               printxval(sigev_value, sev.sigev_notify+1, "SIGEV_???");
+               printxval(sigev_value, sev.sigev_notify, "SIGEV_???");
                tprints(", ");
                if (sev.sigev_notify == SIGEV_THREAD_ID)
 #if defined(HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD)