changeset 2466:59e8f118ad34

Removed xs_memset(), just use memset().
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 29 Mar 2008 11:14:39 +0200
parents 2df887365f92
children 13f021d53367
files src/sid/xmms-sid.c src/sid/xs_config.c src/sid/xs_md5.c src/sid/xs_stil.c src/sid/xs_support.c src/sid/xs_support.h
diffstat 6 files changed, 7 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/sid/xmms-sid.c	Fri Mar 28 02:42:17 2008 +0200
+++ b/src/sid/xmms-sid.c	Sat Mar 29 11:14:39 2008 +0200
@@ -138,7 +138,7 @@
 	XS_MUTEX_LOCK(xs_cfg);
 
 	/* Initialize status and sanitize configuration */
-	xs_memset(&xs_status, 0, sizeof(xs_status));
+	memset(&xs_status, 0, sizeof(xs_status));
 
 	if (xs_cfg.audioFrequency < 8000)
 		xs_cfg.audioFrequency = 8000;
--- a/src/sid/xs_config.c	Fri Mar 28 02:42:17 2008 +0200
+++ b/src/sid/xs_config.c	Sat Mar 29 11:14:39 2008 +0200
@@ -210,7 +210,7 @@
 	XSDEBUG("initializing configuration ...\n");
 	XS_MUTEX_LOCK(xs_cfg);
 
-	xs_memset(&xs_cfg, 0, sizeof(xs_cfg));
+	memset(&xs_cfg, 0, sizeof(xs_cfg));
 	
 	/* Initialize values with sensible defaults */
 	xs_cfg.audioBitsPerSample = XS_RES_16BIT;
--- a/src/sid/xs_md5.c	Fri Mar 28 02:42:17 2008 +0200
+++ b/src/sid/xs_md5.c	Sat Mar 29 11:14:39 2008 +0200
@@ -205,15 +205,15 @@
 	/* Pad out to 56 mod 64 */
 	if (count < 8) {
 		/* Two lots of padding:  Pad the first block to 64 bytes */
-		xs_memset(p, 0, count);
+		memset(p, 0, count);
 		xs_md5_bytereverse(ctx->in, 16);
 		xs_md5_transform(ctx->buf, (guint32 *) ctx->in);
 
 		/* Now fill the next block with 56 bytes */
-		xs_memset(ctx->in, 0, 56);
+		memset(ctx->in, 0, 56);
 	} else {
 		/* Pad block to 56 bytes */
-		xs_memset(p, 0, count - 8);
+		memset(p, 0, count - 8);
 	}
 	xs_md5_bytereverse(ctx->in, 14);
 
@@ -224,5 +224,5 @@
 	xs_md5_transform(ctx->buf, (guint32 *) ctx->in);
 	xs_md5_bytereverse((guint8 *) ctx->buf, 4);
 	memcpy(digest, ctx->buf, 16);
-	xs_memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
+	memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
 }
--- a/src/sid/xs_stil.c	Fri Mar 28 02:42:17 2008 +0200
+++ b/src/sid/xs_stil.c	Sat Mar 29 11:14:39 2008 +0200
@@ -55,7 +55,7 @@
 			clearIndex = pNode->nsubTunes + 1;
 			clearLength = (nsubTunes - clearIndex + 1);
 		}
-		xs_memset(&(pNode->subTunes[clearIndex]), 0, clearLength * sizeof(t_xs_stil_subnode **));
+		memset(&(pNode->subTunes[clearIndex]), 0, clearLength * sizeof(t_xs_stil_subnode **));
 		
 		pNode->nsubTunes = nsubTunes;
 	}
--- a/src/sid/xs_support.c	Fri Mar 28 02:42:17 2008 +0200
+++ b/src/sid/xs_support.c	Sat Mar 29 11:14:39 2008 +0200
@@ -298,16 +298,3 @@
 		(*piPos)++;
 }
 
-
-#ifndef HAVE_MEMSET
-void *xs_memset(void *p, int c, size_t n)
-{
-	guint8 *dp;
-
-	dp = (guint8 *) p;
-	while (n--)
-		*(dp++) = c;
-
-	return p;
-}
-#endif
--- a/src/sid/xs_support.h	Fri Mar 28 02:42:17 2008 +0200
+++ b/src/sid/xs_support.h	Sat Mar 29 11:14:39 2008 +0200
@@ -105,12 +105,6 @@
 void	xs_findeol(const gchar *, size_t *);
 void	xs_findnum(const gchar *, size_t *);
 
-#ifdef HAVE_MEMSET
-#define	xs_memset memset
-#else
-void	*xs_memset(void *, int, size_t);
-#endif
-
 #ifdef __cplusplus
 }
 #endif