mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Corrected a logic error introduced in previous commit.
This commit is contained in:
parent
dac65bdab8
commit
056de3f69d
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user