First pread/pwrite typo fixes

This commit is contained in:
Gregory Nutt 2014-10-04 07:39:30 -06:00
parent 884ab0500c
commit 6d33cd329d
2 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset)
/* Then seek to the correct position in the file */
pos = lseek(fd, offset, SEEK_CUR);
pos = lseek(fd, offset, SEEK_SET);
if (pos == (off_t)-1)
{
/* This might fail is the offset is beyond the end of file */
@ -116,7 +116,7 @@ ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset)
/* Restore the file position */
pos = lseek(fd, savepos, SEEK_CUR);
pos = lseek(fd, savepos, SEEK_SET);
if (pos == (off_t)-1 && ret >= 0)
{
/* This really should not fail */

View File

@ -99,7 +99,7 @@ ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset)
/* Then seek to the correct position in the file */
pos = lseek(fd, offset, SEEK_CUR);
pos = lseek(fd, offset, SEEK_SET);
if (pos == (off_t)-1)
{
/* This might fail is the offset is beyond the end of file */
@ -114,7 +114,7 @@ ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset)
/* Restore the file position */
pos = lseek(fd, savepos, SEEK_CUR);
pos = lseek(fd, savepos, SEEK_SET);
if (pos == (off_t)-1 && ret >= 0)
{
/* This really should not fail */