summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-05-09 08:07:10 -0600
committerBrian <brian@yutani.localnet.net>2007-05-09 08:07:15 -0600
commit516259d609d1f9c598fefb38d82103211c9463db (patch)
tree69d0d33c596588e4767d30f4b4fa848a7b7f8f48 /src/mesa/drivers/dri/i915
parent3e4302fe3b3cf0d559b1288f3965f800ee35cd41 (diff)
Clean-up in I830AllocVidMem(), s/int/unsigned long/ for ret variable.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/server/intel_dri.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i915/server/intel_dri.c b/src/mesa/drivers/dri/i915/server/intel_dri.c
index 169fdbece3..b6946b75d2 100644
--- a/src/mesa/drivers/dri/i915/server/intel_dri.c
+++ b/src/mesa/drivers/dri/i915/server/intel_dri.c
@@ -455,12 +455,14 @@ static unsigned long AllocFromAGP(const DRIDriverContext *ctx, I830Rec *pI830, l
}
unsigned long
-I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830, I830MemRange *result, I830MemPool *pool, long size, unsigned long alignment, int flags)
+I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830,
+ I830MemRange *result, I830MemPool *pool, long size,
+ unsigned long alignment, int flags)
{
- int ret;
+ unsigned long ret;
- if (!result)
- return 0;
+ if (!result)
+ return 0;
/* Make sure these are initialised. */
result->Size = 0;
@@ -470,16 +472,15 @@ I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830, I830MemRange *resul
return 0;
}
- if (pool->Free.Size < size)
- return AllocFromAGP(ctx, pI830, size, alignment, result);
- else
- {
- ret = AllocFromPool(ctx, pI830, result, pool, size, alignment, flags);
-
- if (ret==0)
- return AllocFromAGP(ctx, pI830, size, alignment, result);
- return ret;
+ if (pool->Free.Size < size) {
+ ret = AllocFromAGP(ctx, pI830, size, alignment, result);
+ }
+ else {
+ ret = AllocFromPool(ctx, pI830, result, pool, size, alignment, flags);
+ if (ret == 0)
+ ret = AllocFromAGP(ctx, pI830, size, alignment, result);
}
+ return ret;
}
static Bool BindAgpRange(const DRIDriverContext *ctx, I830MemRange *mem)