Corrected a logic error introduced in previous commit.

This commit is contained in:
Ward Fisher 2014-08-27 15:40:41 -06:00
parent dac65bdab8
commit 056de3f69d

View File

@ -290,9 +290,10 @@ px_pgin(ncio *const nciop,
/* *posp == OFF_NONE (-1) on first call. This
is problematic because lseek also returns -1
on error. Use errno instead. */
if(*posp != OFF_NONE || *posp == lseek(nciop->fd, 0, SEEK_CUR)) {
if(*posp != OFF_NONE && *posp != lseek(nciop->fd, 0, SEEK_CUR)) {
if(errno) {
status = errno;
printf("Error %d: %s\n",errno,strerror(errno));
return status;
}
}