mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-22 22:50:32 +01:00
Remove _mesa_strncpy in favor of plain strncpy.
This commit is contained in:
parent
5fcaa78912
commit
f69d1d1438
5 changed files with 3 additions and 13 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue