aboutsummaryrefslogtreecommitdiff
path: root/nptl/pt-recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pt-recv.c')
-rw-r--r--nptl/pt-recv.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/nptl/pt-recv.c b/nptl/pt-recv.c
index 0b9f7056a3..1280447864 100644
--- a/nptl/pt-recv.c
+++ b/nptl/pt-recv.c
@@ -27,12 +27,9 @@
ssize_t
recv (int fd, __ptr_t buf, size_t n, int flags)
{
- int oldtype;
- ssize_t result;
+ int oldtype = CANCEL_ASYNC ();
- CANCEL_ASYNC (oldtype);
-
- result = __libc_recv (fd, buf, n, flags);
+ ssize_t result = __libc_recv (fd, buf, n, flags);
CANCEL_RESET (oldtype);