util: use standard name for strdup()
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 20 Nov 2018 11:42:14 +0000 (11:42 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Fri, 19 Jul 2019 21:39:38 +0000 (22:39 +0100)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/util/u_debug_symbol.c
src/mesa/program/symbol_table.c
src/util/u_string.h

index d8380b76bf66d434e167e6d60bd75c6f4dc915cf..a3290142b335db3e1cbd9dc9d67d4f3a154ffeaf 100644 (file)
@@ -309,7 +309,7 @@ debug_symbol_name_cached(const void *addr)
    {
       char buf[1024];
       debug_symbol_name(addr, buf, sizeof(buf));
-      name = util_strdup(buf);
+      name = strdup(buf);
 
       util_hash_table_set(symbols_hash, (void*)addr, (void*)name);
    }
index e01faa5c6e1f98ec4f3e87a92896cf89f5264d09..0dcb1f292c91c546bac9817345ab41db77571a6a 100644 (file)
@@ -194,7 +194,7 @@ _mesa_symbol_table_add_symbol(struct _mesa_symbol_table *table,
       new_sym->next_with_same_name = sym;
       new_sym->name = sym->name;
    } else {
-      new_sym->name = util_strdup(name);
+      new_sym->name = strdup(name);
       if (new_sym->name == NULL) {
          free(new_sym);
          _mesa_error_no_memory(__func__);
@@ -266,7 +266,7 @@ _mesa_symbol_table_add_global_symbol(struct _mesa_symbol_table *table,
 
       sym->name = inner_sym->name;
    } else {
-      sym->name = util_strdup(name);
+      sym->name = strdup(name);
       if (sym->name == NULL) {
          free(sym);
          _mesa_error_no_memory(__func__);
index b43c42650e132a9f3f14d65ff965d93a50d892d6..cc97f58e02eaffac1a7f8e41d857514b57345230 100644 (file)
@@ -174,7 +174,7 @@ util_strncmp(const char *s1, const char *s2, size_t n)
 
 
 #define util_strcasecmp stricmp
-#define util_strdup _strdup
+#define strdup _strdup
 
 #else
 
@@ -186,7 +186,6 @@ util_strncmp(const char *s1, const char *s2, size_t n)
 #define util_strncmp strncmp
 #define util_strncat strncat
 #define util_strcasecmp strcasecmp
-#define util_strdup strdup
 
 #endif