aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-06 08:49:13 +0200
committermarha <marha@users.sourceforge.net>2012-09-06 08:49:13 +0200
commitccc8a492607df715b08d27c6bb3b9d13b1ff48a2 (patch)
tree4311d252acd49786ceed60cb55343af0a9294a2f /mesalib/src/mesa/drivers
parenta4d007b9b60f2fc7c8de46533e2f47ecb24f3c9c (diff)
parentaa10a08696cae93799fcddae3f0245ceee905e01 (diff)
downloadvcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.tar.gz
vcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.tar.bz2
vcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/drivers')
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c4
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlconfig.c9
-rw-r--r--mesalib/src/mesa/drivers/windows/gdi/wgl.c2
-rw-r--r--mesalib/src/mesa/drivers/windows/gdi/wmesa.c2
4 files changed, 7 insertions, 10 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 36672a71d..7e81e5ee1 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -1660,7 +1660,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
}
if (mask & GL_DEPTH_BUFFER_BIT) {
- GLuint *tmp = (GLuint *) malloc(srcW * srcH * sizeof(GLuint));
+ GLuint *tmp = malloc(srcW * srcH * sizeof(GLuint));
if (tmp) {
if (!blit->DepthFP)
init_blit_depth_pixels(ctx);
@@ -2712,7 +2712,7 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
return;
}
- bitmap8 = (GLubyte *) malloc(width * height);
+ bitmap8 = malloc(width * height);
if (bitmap8) {
memset(bitmap8, bg, width * height);
_mesa_expand_bitmap(width, height, &unpackSave, bitmap1,
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
index 929748400..72483a42a 100644
--- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
@@ -989,8 +989,7 @@ void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
XML_ParserFree (p);
}
- if (filenames[1])
- free(filenames[1]);
+ free(filenames[1]);
}
void driDestroyOptionInfo (driOptionCache *info) {
@@ -1000,8 +999,7 @@ void driDestroyOptionInfo (driOptionCache *info) {
for (i = 0; i < size; ++i) {
if (info->info[i].name) {
free(info->info[i].name);
- if (info->info[i].ranges)
- free(info->info[i].ranges);
+ free(info->info[i].ranges);
}
}
free(info->info);
@@ -1009,8 +1007,7 @@ void driDestroyOptionInfo (driOptionCache *info) {
}
void driDestroyOptionCache (driOptionCache *cache) {
- if (cache->values)
- free(cache->values);
+ free(cache->values);
}
GLboolean driCheckOption (const driOptionCache *cache, const char *name,
diff --git a/mesalib/src/mesa/drivers/windows/gdi/wgl.c b/mesalib/src/mesa/drivers/windows/gdi/wgl.c
index d99473bb3..3458cc9f3 100644
--- a/mesalib/src/mesa/drivers/windows/gdi/wgl.c
+++ b/mesalib/src/mesa/drivers/windows/gdi/wgl.c
@@ -382,7 +382,7 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
VERIFY(GetTextMetrics(fontDevice, &metric));
- dibInfo = (BITMAPINFO *) calloc(sizeof(BITMAPINFO) + sizeof(RGBQUAD), 1);
+ dibInfo = calloc(sizeof(BITMAPINFO) + sizeof(RGBQUAD), 1);
dibInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
dibInfo->bmiHeader.biPlanes = 1;
dibInfo->bmiHeader.biBitCount = 1;
diff --git a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c
index 93da05fe7..c61020273 100644
--- a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c
@@ -35,7 +35,7 @@ static WMesaFramebuffer
wmesa_new_framebuffer(HDC hdc, struct gl_config *visual)
{
WMesaFramebuffer pwfb
- = (WMesaFramebuffer) malloc(sizeof(struct wmesa_framebuffer));
+ = malloc(sizeof(struct wmesa_framebuffer));
if (pwfb) {
_mesa_initialize_window_framebuffer(&pwfb->Base, visual);
pwfb->hDC = hdc;