about summary refs log tree commit diff
path: root/nptl/pt-pread.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pt-pread.c')
-rw-r--r--nptl/pt-pread.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/nptl/pt-pread.c b/nptl/pt-pread.c
index bcc7e0dc0c..6169ca8532 100644
--- a/nptl/pt-pread.c
+++ b/nptl/pt-pread.c
@@ -27,12 +27,9 @@
 ssize_t
 pread (int fd, void *buf, size_t count, off_t offset)
 {
-  int oldtype;
-  ssize_t result;
+  int oldtype = CANCEL_ASYNC ();
 
-  CANCEL_ASYNC (oldtype);
-
-  result = __libc_pread (fd, buf, count, offset);
+  ssize_t result = __libc_pread (fd, buf, count, offset);
 
   CANCEL_RESET (oldtype);