diff mbox series

[07/21] bcachefs: eytzinger self tests: fix cmp_u16 typo

Message ID 20250128163859.1883260-8-agruenba@redhat.com (mailing list archive)
State New
Headers show
Series bcachefs: eytzinger code | expand

Commit Message

Andreas Gruenbacher Jan. 28, 2025, 4:38 p.m. UTC
Fix an obvious typo in cmp_u16().

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 fs/bcachefs/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
index 7cf319290a88..0ffbd22d3a5e 100644
--- a/fs/bcachefs/util.c
+++ b/fs/bcachefs/util.c
@@ -768,7 +768,7 @@  static inline int cmp_u16(const void *_l, const void *_r)
 {
 	const u16 *l = _l, *r = _r;
 
-	return (*l > *r) - (*r - *l);
+	return (*l > *r) - (*r > *l);
 }
 
 static void eytzinger0_find_test_val(u16 *test_array, unsigned nr, u16 search)