mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix wrong return value of fdio_seek.
This commit is contained in:
parent
29f5cd2335
commit
910197ffa7
1 changed files with 2 additions and 2 deletions
|
@ -79,13 +79,13 @@ static size_t fdio_write(const void* ptr, size_t size, size_t nmemb, void* user)
|
|||
static int fdio_seek(void* user, off_t offset, int whence)
|
||||
{
|
||||
fdio_t* fdio = (fdio_t*) user;
|
||||
return (int) lseek(fdio->fd, offset, whence);
|
||||
return 0 <= lseek(fdio->fd, offset, whence) ? 0 : -1;
|
||||
}
|
||||
|
||||
static off_t fdio_tell(void* user)
|
||||
{
|
||||
fdio_t* fdio = (fdio_t*) user;
|
||||
return lseek(fdio->fd, 0, SEEK_CUR);
|
||||
return lseek(fdio->fd, 0, SEEK_CUR);;
|
||||
}
|
||||
|
||||
static void fdio_seterr(void* user)
|
||||
|
|
Loading…
Reference in a new issue