diff options
author | asomers <asomers@FreeBSD.org> | 2017-06-02 15:11:43 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2017-06-02 15:11:43 +0000 |
commit | ceeebf2539b3f2c3dd6f1f0fb55a5ce87f6ccf7b (patch) | |
tree | 73570c24b15e5bde92d7004fa60192919f750d09 /tests | |
parent | 4ee20f497103ee72874be2f08cc2e0fdb55cc39e (diff) | |
download | FreeBSD-src-ceeebf2539b3f2c3dd6f1f0fb55a5ce87f6ccf7b.zip FreeBSD-src-ceeebf2539b3f2c3dd6f1f0fb55a5ce87f6ccf7b.tar.gz |
MFC r312919 (by rwatson)
Fix build of aio_test on MIPS, where the compiler warns about the local
variable 'err' shadowing the global function err(3). Which it does.
Sponsored by: DARPA, AFRL
Approved by: re
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/aio/aio_test.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/sys/aio/aio_test.c b/tests/sys/aio/aio_test.c index b06fb57..90619b4 100644 --- a/tests/sys/aio/aio_test.c +++ b/tests/sys/aio/aio_test.c @@ -187,18 +187,18 @@ aio_context_init(struct aio_context *ac, int read_fd, static ssize_t poll(struct aiocb *aio) { - int err; + int error; - while ((err = aio_error(aio)) == EINPROGRESS && !aio_timedout) + while ((error = aio_error(aio)) == EINPROGRESS && !aio_timedout) usleep(25000); - switch (err) { + switch (error) { case EINPROGRESS: errno = EINTR; return (-1); case 0: return (aio_return(aio)); default: - return (err); + return (error); } } @@ -206,13 +206,13 @@ static ssize_t suspend(struct aiocb *aio) { const struct aiocb *const iocbs[] = {aio}; - int err; + int error; - err = aio_suspend(iocbs, 1, NULL); - if (err == 0) + error = aio_suspend(iocbs, 1, NULL); + if (error == 0) return (aio_return(aio)); else - return (err); + return (error); } static ssize_t |