[Mesa-dev] [PATCH 1/4] gallium/util: remove unused util_memmove()
Timothy Arceri
tarceri at itsqueeze.com
Wed Mar 8 03:36:14 UTC 2017
This is not used anywhere and Visual Studio looks to have
supported memmove() for a long time if not always.
---
src/gallium/auxiliary/util/u_string.h | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h
index adcdf20..9765aaa 100644
--- a/src/gallium/auxiliary/util/u_string.h
+++ b/src/gallium/auxiliary/util/u_string.h
@@ -172,54 +172,34 @@ util_strstr(const char *haystack, const char *needle)
size_t len = strlen(needle);
for (; (p = util_strchr(p, *needle)) != 0; p++) {
if (util_strncmp(p, needle, len) == 0) {
return (char *)p;
}
}
return NULL;
}
-static inline void *
-util_memmove(void *dest, const void *src, size_t n)
-{
- char *p = (char *)dest;
- const char *q = (const char *)src;
- if (dest < src) {
- while (n--)
- *p++ = *q++;
- }
- else
- {
- p += n;
- q += n;
- while (n--)
- *--p = *--q;
- }
- return dest;
-}
-
#define util_strcasecmp stricmp
#else
#define util_vsnprintf vsnprintf
#define util_snprintf snprintf
#define util_vsprintf vsprintf
#define util_sprintf sprintf
#define util_strchr strchr
#define util_strcmp strcmp
#define util_strncmp strncmp
#define util_strncat strncat
#define util_strstr strstr
-#define util_memmove memmove
#define util_strcasecmp strcasecmp
#endif
/**
* Printable string buffer
*/
struct util_strbuf
{
--
2.9.3
More information about the mesa-dev
mailing list