From d0102bdd4cdfe978064b30746db6feadfad09d5a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 11 Oct 2017 14:41:16 -0600 Subject: [PATCH] Fix a warning found in build testing. --- libc/misc/lib_sendfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/misc/lib_sendfile.c b/libc/misc/lib_sendfile.c index 6cc7b4c49ef..be6fa94c01d 100644 --- a/libc/misc/lib_sendfile.c +++ b/libc/misc/lib_sendfile.c @@ -174,11 +174,11 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) else if (nbytesread < 0) { +#ifndef CONFIG_DISABLE_SIGNALS int errcode = _NX_GETERRNO(nbytesread); /* EINTR is not an error (but will still stop the copy) */ -#ifndef CONFIG_DISABLE_SIGNALS if (errcode != EINTR || ntransferred == 0) #endif { @@ -231,6 +231,7 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) else { +#ifndef CONFIG_DISABLE_SIGNALS int errcode = _NX_GETERRNO(nbyteswritten); /* Check for a read ERROR. EINTR is a special case. This @@ -240,7 +241,6 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) * suppose just continue? */ -#ifndef CONFIG_DISABLE_SIGNALS if (errcode != EINTR || ntransferred == 0) #endif {