Skip to content

Commit

Permalink
reversed conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Aug 8, 2023
1 parent 15c31b9 commit 5cee82f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libsrc/posixio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5cee82f

Please sign in to comment.