summaryrefslogtreecommitdiff
path: root/mysys/my_pread.c
diff options
context:
space:
mode:
authorpetr@mysql.com <>2006-06-30 03:28:58 +0400
committerpetr@mysql.com <>2006-06-30 03:28:58 +0400
commit157cc569a8416e62529149f61846744fab986ea1 (patch)
tree61671b184754212c2d12253f0bffd1c67ccd1fde /mysys/my_pread.c
parent35b7eb7e224a553f4779e8640cb0fe2dae4870c8 (diff)
downloadmariadb-git-157cc569a8416e62529149f61846744fab986ea1.tar.gz
fix test failures
Diffstat (limited to 'mysys/my_pread.c')
-rw-r--r--mysys/my_pread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index eef92b9ebc6..a829caa80d2 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -66,8 +66,9 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
pthread_mutex_unlock(&my_file_info[Filedes].mutex);
#else
- error=((readbytes = (uint) pread(Filedes, Buffer, Count, offset)) != Count);
- my_errno= errno;
+ if ((error= ((readbytes =
+ (uint) pread(Filedes, Buffer, Count, offset)) != Count)))
+ my_errno= errno;
#endif
if (error || readbytes != Count)
{