From 36e1a4b2367e38be7a5c37d286418e574d8d0ce2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 31 May 2005 11:27:12 +0000 Subject: [PATCH] Shifting of mapping window is unlikely(). --- lib/partmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/partmap.c b/lib/partmap.c index 7a31de28..8b6cdc94 100644 --- a/lib/partmap.c +++ b/lib/partmap.c @@ -65,7 +65,7 @@ partmap_close(struct partmap *p) void * partmap_map(struct partmap *p, sh_off_t start, uns size) { - if (!p->start_map || start < p->start_off || (sh_off_t) (start+size) > p->end_off) + if (unlikely(!p->start_map || start < p->start_off || (sh_off_t) (start+size) > p->end_off)) { if (p->start_map) munmap(p->start_map, p->end_off - p->start_off); -- 2.39.2