summaryrefslogtreecommitdiff
path: root/lib/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cache.c')
-rw-r--r--lib/cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/cache.c b/lib/cache.c
index 41d2d5d..e61b201 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -80,9 +80,9 @@ static int __erofs_battach(struct erofs_buffer_block *bb,
bool dryrun)
{
const erofs_off_t alignedoffset = roundup(bb->buffers.off, alignsize);
- const int oob = sgn(roundup(bb->buffers.off % EROFS_BLKSIZ,
- alignsize) + incr + extrasize -
- EROFS_BLKSIZ);
+ const int oob = cmpsgn(roundup(bb->buffers.off % EROFS_BLKSIZ,
+ alignsize) + incr + extrasize,
+ EROFS_BLKSIZ);
bool tailupdate = false;
erofs_blk_t blkaddr;