author | Alberto Bertogli
<albertito@gmail.com> 2004-06-03 04:03:19 UTC |
committer | Alberto Bertogli
<albertito@gmail.com> 2007-07-15 13:02:29 UTC |
parent | 30c458170d4fa1a4aa3b038be3178e90754b912b |
ansi.c | +5 | -1 |
diff --git a/ansi.c b/ansi.c index 054503b..8ded686 100644 --- a/ansi.c +++ b/ansi.c @@ -181,7 +181,11 @@ int jfseek(struct jfs *stream, long offset, int whence) pos = lseek(stream->fd, offset, whence); pthread_mutex_unlock(&(stream->lock)); - return pos; + /* fseek returns 0 on success, -1 on error */ + if (pos == -1) + return 1; + + return 0; } /* ftell wrapper */