about summary refs log tree commit diff
path: root/nptl/pt-nanosleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pt-nanosleep.c')
-rw-r--r--nptl/pt-nanosleep.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/nptl/pt-nanosleep.c b/nptl/pt-nanosleep.c
index 1d6cbb5170..91f111766a 100644
--- a/nptl/pt-nanosleep.c
+++ b/nptl/pt-nanosleep.c
@@ -27,15 +27,12 @@
 int
 __nanosleep (const struct timespec *requested_time, struct timespec *remaining)
 {
-  int oldtype;
-  int result;
-
-  CANCEL_ASYNC (oldtype);
+  int oldtype = CANCEL_ASYNC ();
 
 #ifdef INLINE_SYSCALL
-  result = INLINE_SYSCALL (nanosleep, 2, requested_time, remaining);
+  int result = INLINE_SYSCALL (nanosleep, 2, requested_time, remaining);
 #else
-  result = __libc_nanosleep (requested_time, remaining);
+  int result = __libc_nanosleep (requested_time, remaining);
 #endif
 
   CANCEL_RESET (oldtype);