Mercurial > hg > th-libs
changeset 98:1760e7f53359
Remove th_memset().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 25 May 2014 01:01:13 +0300 |
parents | a285cdc05810 |
children | 5819454a28a4 |
files | th_util.c th_util.h |
diffstat | 2 files changed, 1 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/th_util.c Sat May 24 21:44:36 2014 +0300 +++ b/th_util.c Sun May 25 01:01:13 2014 +0300 @@ -202,18 +202,6 @@ } -#ifndef HAVE_MEMSET -void *th_memset(void *p, int c, size_t n) -{ - unsigned char *dp = (unsigned char *) p; - - while (n--) - *(dp++) = c; - - return p; -} -#endif - /* Doubly linked list handling * * In this implementation first node's prev points to last node of the list, @@ -528,7 +516,7 @@ buf->data = (char **) th_realloc(buf->data, (buf->size + n) * sizeof(char *)); if (buf->data != NULL) { - th_memset(buf->data + buf->size, 0, sizeof(char *) * n); + memset(buf->data + buf->size, 0, sizeof(char *) * n); buf->size += n; return TRUE; } else
--- a/th_util.h Sat May 24 21:44:36 2014 +0300 +++ b/th_util.h Sun May 25 01:01:13 2014 +0300 @@ -24,7 +24,6 @@ #ifdef HAVE_STRING_H #include <string.h> -#define HAVE_MEMSET 1 #else #ifdef HAVE_STRINGS_H #include <strings.h> @@ -138,12 +137,6 @@ void *th_realloc(void *, size_t); void th_free(void *); -#ifdef HAVE_MEMSET -#define th_memset memset -#else -void *th_memset(void *, int, size_t); -#endif - /* Doubly linked list handling */