diff options
| author | Federico Angelilli <code@fedang.net> | 2024-09-21 00:23:25 +0200 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-09-21 00:23:25 +0200 |
| commit | 09190056721872069a82db51d97de6ab60f73a40 (patch) | |
| tree | 39afa0488d680cfda870a109e5d3d5dbdfa3d684 /src/effects/pulse.c | |
| parent | ae59c294bfd4b73f6e751a3103c2ee7501068492 (diff) | |
Allow user to specify effect
Diffstat (limited to 'src/effects/pulse.c')
| -rw-r--r-- | src/effects/pulse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/effects/pulse.c b/src/effects/pulse.c index c2a324a..a6983ba 100644 --- a/src/effects/pulse.c +++ b/src/effects/pulse.c @@ -47,8 +47,8 @@ static void effect_pulse_pre(effect_t *effect, layout_t *layout, cairo_t *cr) static effect_t *effect_pulse_allocate(const effect_info_t *info) { - effect_pulse_t *effect = calloc(1, sizeof(effect_pulse_t)); - assert(effect != NULL); + effect_pulse_t *effect = malloc(sizeof(effect_pulse_t)); + effect_init((effect_t *)effect, info); effect->amplitude = *(unsigned int *)info->state / 100.0; return (effect_t *)effect; } |
