reversed conditional

This commit is contained in:
Dennis Heimbigner 2023-08-08 15:14:04 -06:00
parent 15c31b9eb6
commit 5cee82fd66

View File

@ -536,7 +536,7 @@ px_get(ncio *const nciop, ncio_px *const pxp,
off_t diff = (size_t)(offset - blkoffset);
off_t blkextent = _RNDUP(diff + extent, pxp->blksz);
if(extent == 0 || extent >= X_INT_MAX || offset >= 0) /* sanity check */
if(!(extent != 0 && extent < X_INT_MAX && offset >= 0)) /* sanity check */
return NC_ENOTNC;
if(2 * pxp->blksz < blkextent)