summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-02-18 23:50:54 -0800
committerKristian Høgsberg <krh@bitplanet.net>2010-02-19 07:50:40 -0500
commitf69d1d1438361f10fd8db78d2d38f26e33db9747 (patch)
treeef341a11b10987705b271ef84ab49b210d123880
parent5fcaa78912bc78a5db410200c5987e2c57fad570 (diff)
Remove _mesa_strncpy in favor of plain strncpy.
-rw-r--r--src/gallium/state_trackers/glx/xlib/glx_api.c2
-rw-r--r--src/mesa/drivers/x11/fakeglx.c2
-rw-r--r--src/mesa/main/dlopen.c2
-rw-r--r--src/mesa/main/imports.c7
-rw-r--r--src/mesa/main/imports.h3
5 files changed, 3 insertions, 13 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index 3caf56e924b..7e86e68b682 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -442,7 +442,7 @@ get_env_visual(Display *dpy, int scr, const char *varname)
return NULL;
}
- _mesa_strncpy( value, _mesa_getenv(varname), 100 );
+ strncpy( value, _mesa_getenv(varname), 100 );
value[99] = 0;
sscanf( value, "%s %d", type, &depth );
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 5c0084f37aa..3b8c41b9183 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -616,7 +616,7 @@ get_env_visual(Display *dpy, int scr, const char *varname)
return NULL;
}
- _mesa_strncpy( value, _mesa_getenv(varname), 100 );
+ strncpy( value, _mesa_getenv(varname), 100 );
value[99] = 0;
sscanf( value, "%s %d", type, &depth );
diff --git a/src/mesa/main/dlopen.c b/src/mesa/main/dlopen.c
index 81e032081db..658ac9e40cf 100644
--- a/src/mesa/main/dlopen.c
+++ b/src/mesa/main/dlopen.c
@@ -73,7 +73,7 @@ _mesa_dlsym(void *handle, const char *fname)
/* need '_' prefix on symbol names */
char fname2[1000];
fname2[0] = '_';
- _mesa_strncpy(fname2 + 1, fname, 998);
+ strncpy(fname2 + 1, fname, 998);
fname2[999] = 0;
return (GenericFunc) dlsym(handle, fname2);
#elif defined(_GNU_SOURCE)
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 19deef57679..78c5cada753 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -841,13 +841,6 @@ _mesa_getenv( const char *var )
/** \name String */
/*@{*/
-/** Wrapper around strncpy() */
-char *
-_mesa_strncpy( char *dest, const char *src, size_t n )
-{
- return strncpy(dest, src, n);
-}
-
/** Wrapper around strlen() */
size_t
_mesa_strlen( const char *s )
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 0143be3ced2..192dffe8c6f 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -611,9 +611,6 @@ _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size,
extern char *
_mesa_getenv( const char *var );
-extern char *
-_mesa_strncpy( char *dest, const char *src, size_t n );
-
extern size_t
_mesa_strlen( const char *s );