diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-06-25 04:05:11 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-06-25 04:05:11 +1000 |
commit | b40ed6a0b54d1ba74799aeb3f529c4d298625aa1 (patch) | |
tree | da1ae04dcd8c1db1294f3caab9ba28760ccb3f8e /src/mesa/main/mm.c | |
parent | 95fe122f67024f55d555e2816a95409a8b53a49e (diff) | |
parent | 0561a293b6596641c0200df7e6580599ecb8b111 (diff) |
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/main/mm.c')
-rw-r--r-- | src/mesa/main/mm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/main/mm.c b/src/mesa/main/mm.c index fb7809ed22..6f381b02a7 100644 --- a/src/mesa/main/mm.c +++ b/src/mesa/main/mm.c @@ -53,11 +53,11 @@ mmDumpMemInfo(const struct mem_block *heap) } struct mem_block * -mmInit(unsigned int ofs, int size) +mmInit(unsigned ofs, unsigned size) { struct mem_block *heap, *block; - if (size <= 0) + if (!size) return NULL; heap = (struct mem_block *) _mesa_calloc(sizeof(struct mem_block)); @@ -91,8 +91,8 @@ mmInit(unsigned int ofs, int size) static struct mem_block * SliceBlock(struct mem_block *p, - unsigned int startofs, int size, - int reserved, int alignment) + unsigned startofs, unsigned size, + unsigned reserved, unsigned alignment) { struct mem_block *newblock; @@ -160,14 +160,14 @@ SliceBlock(struct mem_block *p, struct mem_block * -mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch) +mmAllocMem(struct mem_block *heap, unsigned size, unsigned align2, unsigned startSearch) { struct mem_block *p; - const int mask = (1 << align2)-1; - unsigned int startofs = 0; - unsigned int endofs; + const unsigned mask = (1 << align2)-1; + unsigned startofs = 0; + unsigned endofs; - if (!heap || align2 < 0 || size <= 0) + if (!heap || !align2 || !size) return NULL; for (p = heap->next_free; p != heap; p = p->next_free) { @@ -193,7 +193,7 @@ mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch) struct mem_block * -mmFindBlock(struct mem_block *heap, int start) +mmFindBlock(struct mem_block *heap, unsigned start) { struct mem_block *p; |