diff --git a/moberg.c b/moberg.c index 303bd5cca145e743ea488899e2bf062aef547899..34c0c41dae575e238a6b803c8d8e69e783b00a3f 100644 --- a/moberg.c +++ b/moberg.c @@ -46,12 +46,12 @@ static int channel_list_set(struct channel_list *list, if (list->capacity <= index) { int capacity; for (capacity = 2 ; capacity <= index ; capacity *= 2); - void *new = realloc(list->value, capacity * sizeof(**list->value)); + void *new = realloc(list->value, capacity * sizeof(*list->value)); if (!new) { goto err; } void *p = new + list->capacity * sizeof(*list->value); - memset(p, 0, (capacity - list->capacity) * sizeof(**list->value)); + memset(p, 0, (capacity - list->capacity) * sizeof(*list->value)); list->value = new; list->capacity = capacity; }