diff options
author | unknown <Kristofer.Pettersson@naruto.> | 2006-10-17 10:37:55 +0200 |
---|---|---|
committer | unknown <Kristofer.Pettersson@naruto.> | 2006-10-17 10:37:55 +0200 |
commit | 95108de59d7aa49b0c59b449454eff5bc1800699 (patch) | |
tree | 4d79382f26924f77cc223d0a0b95e8922312c560 /mysys/my_seek.c | |
parent | ffd5de297a06481c7c3bc568ae42689dac5dadb4 (diff) | |
parent | c6a67e69331762f1e9e2ba725cb418c4d87a8a27 (diff) | |
download | mariadb-git-95108de59d7aa49b0c59b449454eff5bc1800699.tar.gz |
Merge naruto.:C:/cpp/bug23010/my50-bug23010
into naruto.:C:/cpp/bug23010/my51-bug23010
mysys/my_seek.c:
Auto merged
Diffstat (limited to 'mysys/my_seek.c')
-rw-r--r-- | mysys/my_seek.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mysys/my_seek.c b/mysys/my_seek.c index e5b1905e551..239136c4e7c 100644 --- a/mysys/my_seek.c +++ b/mysys/my_seek.c @@ -29,8 +29,13 @@ my_off_t my_seek(File fd, my_off_t pos, int whence, whence, MyFlags)); DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */ - if (-1 != fd) - newpos=lseek(fd, pos, whence); + /* + Make sure we are using a valid file descriptor! + */ + DBUG_ASSERT(fd != -1); + + newpos= lseek(fd, pos, whence); + if (newpos == (os_off_t) -1) { my_errno=errno; |