blob: dd1b6ce413fe6a62a2ab5e95a4d6b4a3d7d48bd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- llist.c.orig 2008-06-12 02:41:16.000000000 -0400
+++ llist.c 2008-06-12 02:42:31.000000000 -0400
@@ -351,8 +351,7 @@
case 'd': l->e = (void *)malloc(sizeof(int));
*((int *)l->e) = va_arg(*ap, int);
break;
- case 's': l->e = (void *)malloc(sizeof(char *));
- (char *)l->e = strdup(va_arg(*ap, char *));
+ case 's': l->e = (void*)strdup(va_arg(*ap, char *));
break;
case 'f': l->e = (void *)malloc(sizeof(double));
*((double *)l->e) = va_arg(*ap, double);
|