mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
* fports.c (local_seek): Signal an error if the seek fails.
* ports.c (scm_lseek): Don't check return value of port's seek function; it's its job to signal an error if there's a problem.
This commit is contained in:
parent
afc5764cd0
commit
cb8dfa3f67
2 changed files with 5 additions and 4 deletions
|
@ -435,8 +435,11 @@ static off_t
|
|||
local_seek (SCM port, off_t offset, int whence)
|
||||
{
|
||||
struct scm_fport *fp = SCM_FSTREAM (port);
|
||||
|
||||
return lseek (fp->fdes, offset, whence);
|
||||
off_t result = lseek (fp->fdes, offset, whence);
|
||||
|
||||
if (result == -1)
|
||||
scm_syserror ("local_seek");
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -892,8 +892,6 @@ scm_lseek (SCM object, SCM offset, SCM whence)
|
|||
ptob->fflush (object);
|
||||
|
||||
rv = ptob->seek (object, off, how);
|
||||
if (rv == -1)
|
||||
scm_syserror (s_lseek);
|
||||
}
|
||||
}
|
||||
else /* file descriptor?. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue