]> mj.ucw.cz Git - libucw.git/commitdiff
Shifting of mapping window is unlikely().
authorMartin Mares <mj@ucw.cz>
Tue, 31 May 2005 11:27:12 +0000 (11:27 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 31 May 2005 11:27:12 +0000 (11:27 +0000)
lib/partmap.c

index 7a31de28c33ebf94f964fdb1dee814178f62bb6d..8b6cdc94690d62ad12d63ebfc5e1f08265daa3d1 100644 (file)
@@ -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);