aboutsummaryrefslogtreecommitdiffstats
path: root/src/sllist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-28 20:02:17 +0200
committerEric Wong <normalperson@yhbt.net>2008-08-31 03:57:25 -0700
commitc52667aa8eee2a40547026735b9670a2221d4168 (patch)
tree09a27d6adbfbe8b2f54828851b892c6d5d4e19ea /src/sllist.c
parentad02ebe21138fed633af5465d1690db103c4934e (diff)
downloadmpd-c52667aa8eee2a40547026735b9670a2221d4168.tar.gz
mpd-c52667aa8eee2a40547026735b9670a2221d4168.tar.xz
mpd-c52667aa8eee2a40547026735b9670a2221d4168.zip
const pointers
The usual bunch of pointer arguments which should be const.
Diffstat (limited to 'src/sllist.c')
-rw-r--r--src/sllist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sllist.c b/src/sllist.c
index cfe392d60..0f4529fd3 100644
--- a/src/sllist.c
+++ b/src/sllist.c
@@ -34,22 +34,22 @@ struct strnode *new_strnode(char *s)
return x;
}
-struct strnode *new_strnode_dup(char *s, const size_t size)
+struct strnode *new_strnode_dup(const char *s, const size_t size)
{
struct strnode *x = xmalloc(sizeof(struct strnode) + size);
x->next = NULL;
x->data = ((char *)x + sizeof(struct strnode));
- memcpy((void *)x->data, (void*)s, size);
+ memcpy((void *)x->data, (const void*)s, size);
return x;
}
-struct sllnode *new_sllnode(void *s, const size_t size)
+struct sllnode *new_sllnode(const void *s, const size_t size)
{
struct sllnode *x = xmalloc(sizeof(struct sllnode) + size);
x->next = NULL;
x->size = size;
x->data = ((char *)x + sizeof(struct sllnode));
- memcpy(x->data, (void *)s, size);
+ memcpy(x->data, (const void *)s, size);
return x;
}