[PATCH master] partition: Fix wrong check

Sascha Hauer s.hauer at pengutronix.de
Mon Aug 18 01:39:02 PDT 2025


In region_overlap_end_exclusive() we pass startb - 1 as endb argument to
region_overlap_end_inclusive() which is obviously wrong. Fix this.

Fixes: 768fdb36f3 partition: define new region_overlap_end_exclusive helper
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 include/range.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/range.h b/include/range.h
index e7819017e4..bb41dc78ac 100644
--- a/include/range.h
+++ b/include/range.h
@@ -38,7 +38,7 @@ static inline bool region_overlap_end_exclusive(u64 starta, u64 enda,
 		return false;
 
 	return region_overlap_end_inclusive(starta, enda - 1,
-					    startb, startb - 1);
+					    startb, endb - 1);
 }
 
 
-- 
2.39.5




More information about the barebox mailing list