summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-02-19 08:32:36 -0700
committerBrian Paul <brianp@vmware.com>2010-02-19 08:32:36 -0700
commit6bf1ea897fa470af58fe8916dff45e2da79634a3 (patch)
tree109ffe421325506019e5d8007bd6d4a9459619eb /src/mesa/main
parent2240ba10f30315410bcff77e372ee71664ac4453 (diff)
mesa: replace _mesa_bzero() with memset()
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/bufferobj.c2
-rw-r--r--src/mesa/main/dlist.c2
-rw-r--r--src/mesa/main/framebuffer.c6
-rw-r--r--src/mesa/main/imports.c11
-rw-r--r--src/mesa/main/imports.h3
-rw-r--r--src/mesa/main/renderbuffer.c4
-rw-r--r--src/mesa/main/texobj.c2
7 files changed, 8 insertions, 22 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index c735661dc2..2e9793ea0e 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -295,7 +295,7 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj,
{
(void) target;
- _mesa_bzero(obj, sizeof(struct gl_buffer_object));
+ memset(obj, 0, sizeof(struct gl_buffer_object));
_glthread_INIT_MUTEX(obj->Mutex);
obj->RefCount = 1;
obj->Name = name;
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 9c472d85e3..740ebfe17a 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -9711,7 +9711,7 @@ _mesa_init_display_list(GLcontext *ctx)
/* zero-out the instruction size table, just once */
if (!tableInitialized) {
- _mesa_bzero(InstSize, sizeof(InstSize));
+ memset(InstSize, 0, sizeof(InstSize));
tableInitialized = GL_TRUE;
}
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 96e5344383..41b5420943 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -127,7 +127,7 @@ _mesa_initialize_window_framebuffer(struct gl_framebuffer *fb,
assert(fb);
assert(visual);
- _mesa_bzero(fb, sizeof(struct gl_framebuffer));
+ memset(fb, 0, sizeof(struct gl_framebuffer));
_glthread_INIT_MUTEX(fb->Mutex);
@@ -169,7 +169,7 @@ _mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name)
assert(fb);
assert(name);
- _mesa_bzero(fb, sizeof(struct gl_framebuffer));
+ memset(fb, 0, sizeof(struct gl_framebuffer));
fb->Name = name;
fb->RefCount = 1;
@@ -526,7 +526,7 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
{
GLuint i;
- _mesa_bzero(&fb->Visual, sizeof(fb->Visual));
+ memset(&fb->Visual, 0, sizeof(fb->Visual));
fb->Visual.rgbMode = GL_TRUE; /* assume this */
#if 0 /* this _might_ be needed */
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 6730500225..5c2c863f97 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -257,17 +257,6 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n )
*dst++ = val;
}
-/** Wrapper around either memset() or bzero() */
-void
-_mesa_bzero( void *dst, size_t n )
-{
-#if defined(__FreeBSD__)
- bzero( dst, n );
-#else
- memset( dst, 0, n );
-#endif
-}
-
/*@}*/
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 048ae912c9..106dd021a1 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -541,9 +541,6 @@ _mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize );
extern void
_mesa_memset16( unsigned short *dst, unsigned short val, size_t n );
-extern void
-_mesa_bzero( void *dst, size_t n );
-
extern double
_mesa_sin(double a);
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index bb0c78382c..aec22d9d14 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -706,7 +706,7 @@ put_mono_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
if (!mask && val == 0) {
/* common case */
- _mesa_bzero(dst, count * 4 * sizeof(GLubyte));
+ memset(dst, 0, count * 4 * sizeof(GLubyte));
}
else {
/* general case */
@@ -868,7 +868,7 @@ put_mono_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
ASSERT(rb->DataType == GL_UNSIGNED_SHORT || rb->DataType == GL_SHORT);
if (!mask && val0 == 0 && val1 == 0 && val2 == 0 && val3 == 0) {
/* common case for clearing accum buffer */
- _mesa_bzero(dst, count * 4 * sizeof(GLushort));
+ memset(dst, 0, count * 4 * sizeof(GLushort));
}
else {
GLuint i;
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 9db95814d0..649f3587cb 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -106,7 +106,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
target == GL_TEXTURE_1D_ARRAY_EXT ||
target == GL_TEXTURE_2D_ARRAY_EXT);
- _mesa_bzero(obj, sizeof(*obj));
+ memset(obj, 0, sizeof(*obj));
/* init the non-zero fields */
_glthread_INIT_MUTEX(obj->Mutex);
obj->RefCount = 1;