From 9cf269cbe3bc9973578088ce11b117c00d53b157 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 24 Sep 2010 11:43:42 +1000 Subject: [PATCH] Fix bug in sort_block It doesn't handle 2 blocks the same - which isn't a big deal, but it is best to have the code 'right' Signed-off-by: NeilBrown --- modify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modify.c b/modify.c index 424feba..4b74a65 100644 --- a/modify.c +++ b/modify.c @@ -80,8 +80,8 @@ static void sort_blocks(struct block **blkp) if (b[next] == NULL || (b[1-next] != NULL && !((prev <= b[1-next]->fileaddr) - ^(b[1-next]->fileaddr <= b[next]->fileaddr) - ^(b[next]->fileaddr <= prev))) + ^(prev <= b[next]->fileaddr) + ^(b[next]->fileaddr <= b[1-next]->fileaddr))) ) next = 1 - next; -- 2.39.5