diff options
Diffstat (limited to 'src/sllist.c')
-rw-r--r-- | src/sllist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sllist.c b/src/sllist.c index e25615863..e87be6ad5 100644 --- a/src/sllist.c +++ b/src/sllist.c @@ -39,7 +39,7 @@ struct strnode *new_strnode_dup(char *s, const size_t size) { struct strnode *x = malloc(sizeof(struct strnode) + size); x->next = NULL; - x->data = ((void *)x + sizeof(struct strnode)); + x->data = ((char *)x + sizeof(struct strnode)); memcpy((void *)x->data, (void*)s, size); return x; } @@ -49,7 +49,7 @@ struct sllnode *new_sllnode(void *s, const size_t size) struct sllnode *x = malloc(sizeof(struct sllnode) + size); x->next = NULL; x->size = size; - x->data = ((void *)x + sizeof(struct sllnode)); + x->data = ((char *)x + sizeof(struct sllnode)); memcpy(x->data, (void *)s, size); return x; } |