From d7193ce42cedc4cc7839fc4522edf5724e954c80 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 7 Mar 2015 13:15:22 -0700 Subject: mesa: use strdup() instead of _mesa_strdup() We were already using strdup() in various places in Mesa. Get rid of the _mesa_strdup() wrapper. All the callers pass a non-NULL argument so the NULL check isn't needed either. Reviewed-by: Jose Fonseca Reviewed-by: Ian Romanick --- src/mesa/main/imports.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/mesa/main/imports.c') diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index a7ffe229687..ac8deeb97c9 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -481,24 +481,6 @@ _mesa_half_to_float(GLhalfARB val) /** \name String */ /*@{*/ -/** - * Implemented using malloc() and strcpy. - * Note that NULL is handled accordingly. - */ -char * -_mesa_strdup( const char *s ) -{ - if (s) { - size_t l = strlen(s); - char *s2 = malloc(l + 1); - if (s2) - strcpy(s2, s); - return s2; - } - else { - return NULL; - } -} /** Compute simple checksum/hash for a string */ unsigned int -- cgit v1.2.3