From e0eee3ceefd550724058ffbdf878e9eb06e18f18 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sat, 29 Jun 2019 18:19:04 -0500 Subject: fix restrict violations in internal use of several functions The old/new parameters to pthread_sigmask, sigprocmask, and setitimer are marked restrict, so passing the same address to both is prohibited. Modify callers of these functions to use a separate object for each argument. --- src/unistd/ualarm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/unistd') diff --git a/src/unistd/ualarm.c b/src/unistd/ualarm.c index 855504bc..2985855c 100644 --- a/src/unistd/ualarm.c +++ b/src/unistd/ualarm.c @@ -7,7 +7,7 @@ unsigned ualarm(unsigned value, unsigned interval) struct itimerval it = { .it_interval.tv_usec = interval, .it_value.tv_usec = value - }; - setitimer(ITIMER_REAL, &it, &it); - return it.it_value.tv_sec*1000000 + it.it_value.tv_usec; + }, it_old; + setitimer(ITIMER_REAL, &it, &it_old); + return it_old.it_value.tv_sec*1000000 + it_old.it_value.tv_usec; } -- cgit v1.2.1