mesa: replace _mesa_bzero() with memset()
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 4f6f083..87163e6 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -70,7 +70,7 @@
 void
 _mesa_init_driver_functions(struct dd_function_table *driver)
 {
-   _mesa_bzero(driver, sizeof(*driver));
+   memset(driver, 0, sizeof(*driver));
 
    driver->GetString = NULL;  /* REQUIRED! */
    driver->UpdateState = NULL;  /* REQUIRED! */
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
index f3d8f2f..acc66e0 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
@@ -72,7 +72,7 @@
 {
 	int unit;
 
-	_mesa_bzero(state, sizeof(*state));
+	memset(state, 0, sizeof(*state));
 
 	for(unit = 0; unit < 16; ++unit) {
 		if (fp->Base.ShadowSamplers & (1 << unit)) {
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index c735661..2e9793e 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -295,7 +295,7 @@
 {
    (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 9c472d8..740ebfe 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -9711,7 +9711,7 @@
 
    /* 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 96e5344..41b5420 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -127,7 +127,7 @@
    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 @@
    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 @@
 {
    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 6730500..5c2c863 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -257,17 +257,6 @@
       *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 048ae91..106dd02 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -541,9 +541,6 @@
 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 bb0c783..aec22d9 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -706,7 +706,7 @@
    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 @@
    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 9db9581..649f358 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -106,7 +106,7 @@
           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;
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c
index 35f18aa..639408d 100644
--- a/src/mesa/shader/nvfragparse.c
+++ b/src/mesa/shader/nvfragparse.c
@@ -1483,7 +1483,7 @@
    programString[len] = 0;
 
    /* Get ready to parse */
-   _mesa_bzero(&parseState, sizeof(struct parse_state));
+   memset(&parseState, 0, sizeof(struct parse_state));
    parseState.ctx = ctx;
    parseState.start = programString;
    parseState.program = program;
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c
index dcf834f..0c4da4d 100644
--- a/src/mesa/shader/prog_instruction.c
+++ b/src/mesa/shader/prog_instruction.c
@@ -40,7 +40,7 @@
 {
    GLuint i;
 
-   _mesa_bzero(inst, count * sizeof(struct prog_instruction));
+   memset(inst, 0, count * sizeof(struct prog_instruction));
 
    for (i = 0; i < count; i++) {
       inst[i].SrcReg[0].File = PROGRAM_UNDEFINED;
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 2410ccb..0c3c5ff 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -240,7 +240,7 @@
    (void) ctx;
    if (prog) {
       GLuint i;
-      _mesa_bzero(prog, sizeof(*prog));
+      memset(prog, 0, sizeof(*prog));
       prog->Id = id;
       prog->Target = target;
       prog->Resident = GL_TRUE;
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index fa3a63e..b621e89 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -241,7 +241,7 @@
 {
    assert(size >= 1);
    assert(size <= 4);
-   _mesa_bzero(temp, sizeof(*temp));
+   memset(temp, 0, sizeof(*temp));
    temp->Size = size;
    temp->File = PROGRAM_TEMPORARY;
    temp->Index = -1;
@@ -1136,7 +1136,7 @@
     * dest for this clamp() is an output reg, we can't use that reg for
     * the intermediate result.  Use a temp register instead.
     */
-   _mesa_bzero(&tmpNode, sizeof(tmpNode));
+   memset(&tmpNode, 0, sizeof(tmpNode));
    if (!alloc_node_storage(emitInfo, &tmpNode, n->Store->Size)) {
       return NULL;
    }
diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c
index a96f2fb..01e2bc4 100644
--- a/src/mesa/shader/slang/slang_typeinfo.c
+++ b/src/mesa/shader/slang/slang_typeinfo.c
@@ -419,7 +419,7 @@
 GLboolean
 slang_typeinfo_construct(slang_typeinfo * ti)
 {
-   _mesa_bzero(ti, sizeof(*ti));
+   memset(ti, 0, sizeof(*ti));
    slang_type_specifier_ctr(&ti->spec);
    ti->array_len = 0;
    return GL_TRUE;
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 36c8db2..3e36cf9 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -259,7 +259,7 @@
 	 }
 	 break;
       case GL_NEVER:
-         _mesa_bzero(mask, n * sizeof(GLubyte));
+         memset(mask, 0, n * sizeof(GLubyte));
 	 break;
       default:
          _mesa_problem(ctx, "Bad depth func in depth_test_span16");
@@ -488,7 +488,7 @@
 	 }
 	 break;
       case GL_NEVER:
-         _mesa_bzero(mask, n * sizeof(GLubyte));
+         memset(mask, 0, n * sizeof(GLubyte));
 	 break;
       default:
          _mesa_problem(ctx, "Bad depth func in depth_test_span32");
@@ -844,7 +844,7 @@
 	 break;
       case GL_NEVER:
 	 /* depth test never passes */
-         _mesa_bzero(mask, n * sizeof(GLubyte));
+         memset(mask, 0, n * sizeof(GLubyte));
 	 break;
       default:
          _mesa_problem(ctx, "Bad depth func in direct_depth_test_pixels");
@@ -1090,7 +1090,7 @@
 	 break;
       case GL_NEVER:
 	 /* depth test never passes */
-         _mesa_bzero(mask, n * sizeof(GLubyte));
+         memset(mask, 0, n * sizeof(GLubyte));
 	 break;
       default:
          _mesa_problem(ctx, "Bad depth func in direct_depth_test_pixels");
@@ -1260,7 +1260,7 @@
 
    if (!rb) {
       /* really only doing this to prevent FP exceptions later */
-      _mesa_bzero(depth, n * sizeof(GLfloat));
+      memset(depth, 0, n * sizeof(GLfloat));
       return;
    }
 
@@ -1269,7 +1269,7 @@
    if (y < 0 || y >= (GLint) rb->Height ||
        x + n <= 0 || x >= (GLint) rb->Width) {
       /* span is completely outside framebuffer */
-      _mesa_bzero(depth, n * sizeof(GLfloat));
+      memset(depth, 0, n * sizeof(GLfloat));
       return;
    }
 
@@ -1326,7 +1326,7 @@
 
    if (!rb) {
       /* really only doing this to prevent FP exceptions later */
-      _mesa_bzero(depth, n * sizeof(GLuint));
+      memset(depth, 0, n * sizeof(GLuint));
       return;
    }
 
@@ -1337,7 +1337,7 @@
    if (y < 0 || y >= (GLint) rb->Height ||
        x + n <= 0 || x >= (GLint) rb->Width) {
       /* span is completely outside framebuffer */
-      _mesa_bzero(depth, n * sizeof(GLfloat));
+      memset(depth, 0, n * sizeof(GLfloat));
       return;
    }
 
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index d31da4c..7c1de62 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -148,8 +148,7 @@
 
    if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) {
       /* Clear temporary registers (undefined for ARB_f_p) */
-      _mesa_bzero(machine->Temporaries,
-                  MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat));
+      memset(machine->Temporaries, 0, MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat));
    }
 
    /* ARB_fragment_coord_conventions */
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 7087f25..dada364 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1579,7 +1579,7 @@
    if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) {
       /* completely above, below, or right */
       /* XXX maybe leave rgba values undefined? */
-      _mesa_bzero(rgba, 4 * n * sizeof(GLchan));
+      memset(rgba, 0, 4 * n * sizeof(GLchan));
    }
    else {
       GLint skip, length;
@@ -1642,7 +1642,7 @@
 
    if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) {
       /* completely above, below, or right */
-      _mesa_bzero(index, n * sizeof(GLuint));
+      memset(index, 0, n * sizeof(GLuint));
    }
    else {
       GLint skip, length;