Mesa (master): Remove incorrect test from mmAllocMem.

Michel Dänzer daenzer at kemper.freedesktop.org
Mon Sep 22 09:50:59 UTC 2008


Module: Mesa
Branch: master
Commit: 78f4a695ad7140cd0148467f041e874afc655426
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=78f4a695ad7140cd0148467f041e874afc655426

Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Sep 22 11:48:26 2008 +0200

Remove incorrect test from mmAllocMem.

0 is a perfectly valid alignment shift, see e.g. driTexturesGone() which was
broken by this.

---

 src/mesa/main/mm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/mm.c b/src/mesa/main/mm.c
index 6f381b0..d430bcd 100644
--- a/src/mesa/main/mm.c
+++ b/src/mesa/main/mm.c
@@ -167,7 +167,7 @@ mmAllocMem(struct mem_block *heap, unsigned size, unsigned align2, unsigned star
    unsigned startofs = 0;
    unsigned endofs;
 
-   if (!heap || !align2 || !size)
+   if (!heap || !size)
       return NULL;
 
    for (p = heap->next_free; p != heap; p = p->next_free) {




More information about the mesa-commit mailing list