summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-05-28 18:10:25 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-05-28 18:10:25 -0700
commitfc476199681664f4498babba674c209147fc041c (patch)
treec3f6f4fdc7d757e2b27e601317509be4755a41f4
parentfead6a99d3fe4be0c1b654ed3f8fac10f5aff204 (diff)
*: use NULL for free() in til_setup_new()
Commit 7c8086020 switched the til_setup_new() api to support NULL free_func for free(). This mechanical change pivots to that instead of the awkwardly cast free() parameters.
-rw-r--r--src/mem_fb.c2
-rw-r--r--src/modules/blinds/blinds.c2
-rw-r--r--src/modules/drizzle/drizzle.c2
-rw-r--r--src/modules/flui2d/flui2d.c2
-rw-r--r--src/modules/moire/moire.c2
-rw-r--r--src/modules/pixbounce/pixbounce.c2
-rw-r--r--src/modules/plato/plato.c2
-rw-r--r--src/modules/rkt/rkt.c2
-rw-r--r--src/modules/rtv/rtv.c2
-rw-r--r--src/modules/shapes/shapes.c2
-rw-r--r--src/modules/sparkler/sparkler.c2
-rw-r--r--src/modules/stars/stars.c2
-rw-r--r--src/modules/strobe/strobe.c2
-rw-r--r--src/modules/submit/submit.c2
-rw-r--r--src/modules/swarm/swarm.c2
-rw-r--r--src/modules/voronoi/voronoi.c2
-rw-r--r--src/sdl_fb.c2
17 files changed, 17 insertions, 17 deletions
diff --git a/src/mem_fb.c b/src/mem_fb.c
index cd65bcc..a152d6a 100644
--- a/src/mem_fb.c
+++ b/src/mem_fb.c
@@ -48,7 +48,7 @@ static int mem_fb_setup(const til_settings_t *settings, til_setting_t **res_sett
if (res_setup) {
mem_fb_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/blinds/blinds.c b/src/modules/blinds/blinds.c
index 0494cd1..ecfa2d5 100644
--- a/src/modules/blinds/blinds.c
+++ b/src/modules/blinds/blinds.c
@@ -175,7 +175,7 @@ static int blinds_setup(const til_settings_t *settings, til_setting_t **res_sett
if (res_setup) {
blinds_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/drizzle/drizzle.c b/src/modules/drizzle/drizzle.c
index f60aa6e..3485cc1 100644
--- a/src/modules/drizzle/drizzle.c
+++ b/src/modules/drizzle/drizzle.c
@@ -402,7 +402,7 @@ static int drizzle_setup(const til_settings_t *settings, til_setting_t **res_set
drizzle_setup_t *setup;
int i;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/flui2d/flui2d.c b/src/modules/flui2d/flui2d.c
index d3a36a6..ba95023 100644
--- a/src/modules/flui2d/flui2d.c
+++ b/src/modules/flui2d/flui2d.c
@@ -523,7 +523,7 @@ static int flui2d_setup(const til_settings_t *settings, til_setting_t **res_sett
if (res_setup) {
flui2d_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/moire/moire.c b/src/modules/moire/moire.c
index eb4c10b..8616f3b 100644
--- a/src/modules/moire/moire.c
+++ b/src/modules/moire/moire.c
@@ -142,7 +142,7 @@ static int moire_setup(const til_settings_t *settings, til_setting_t **res_setti
if (res_setup) {
moire_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/pixbounce/pixbounce.c b/src/modules/pixbounce/pixbounce.c
index f5c2a99..80857f7 100644
--- a/src/modules/pixbounce/pixbounce.c
+++ b/src/modules/pixbounce/pixbounce.c
@@ -374,7 +374,7 @@ int pixbounce_setup(const til_settings_t *settings, til_setting_t **res_setting,
if (res_setup) {
pixbounce_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/plato/plato.c b/src/modules/plato/plato.c
index 472fba1..f8a3483 100644
--- a/src/modules/plato/plato.c
+++ b/src/modules/plato/plato.c
@@ -744,7 +744,7 @@ static int plato_setup(const til_settings_t *settings, til_setting_t **res_setti
plato_setup_t *setup;
int i;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c
index 23e1b14..d274391 100644
--- a/src/modules/rkt/rkt.c
+++ b/src/modules/rkt/rkt.c
@@ -391,7 +391,7 @@ static int rkt_setup(const til_settings_t *settings, til_setting_t **res_setting
return -ENOENT;
/* TODO: we're going to need a custom setup_free to cleanup host+base etc. */
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c
index a0f8047..29d1e71 100644
--- a/src/modules/rtv/rtv.c
+++ b/src/modules/rtv/rtv.c
@@ -492,7 +492,7 @@ static int rtv_setup(const til_settings_t *settings, til_setting_t **res_setting
rtv_setup_t *setup;
/* FIXME: rtv_setup_t.snow_module needs freeing, so we need a bespoke free_func */
- setup = til_setup_new(sizeof(*setup) + sizeof(setup->channels[0]), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup) + sizeof(setup->channels[0]), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/shapes/shapes.c b/src/modules/shapes/shapes.c
index 0b89373..c3b0ef4 100644
--- a/src/modules/shapes/shapes.c
+++ b/src/modules/shapes/shapes.c
@@ -455,7 +455,7 @@ static int shapes_setup(const til_settings_t *settings, til_setting_t **res_sett
shapes_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/sparkler/sparkler.c b/src/modules/sparkler/sparkler.c
index 3f3c681..6105112 100644
--- a/src/modules/sparkler/sparkler.c
+++ b/src/modules/sparkler/sparkler.c
@@ -184,7 +184,7 @@ static int sparkler_setup(const til_settings_t *settings, til_setting_t **res_se
if (res_setup) {
sparkler_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/stars/stars.c b/src/modules/stars/stars.c
index 845d945..68e0335 100644
--- a/src/modules/stars/stars.c
+++ b/src/modules/stars/stars.c
@@ -276,7 +276,7 @@ int stars_setup(const til_settings_t *settings, til_setting_t **res_setting, con
if (res_setup) {
stars_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/strobe/strobe.c b/src/modules/strobe/strobe.c
index 495b95b..cd3ba94 100644
--- a/src/modules/strobe/strobe.c
+++ b/src/modules/strobe/strobe.c
@@ -123,7 +123,7 @@ static int strobe_setup(const til_settings_t *settings, til_setting_t **res_sett
if (res_setup) {
strobe_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/submit/submit.c b/src/modules/submit/submit.c
index 43068ed..24e7315 100644
--- a/src/modules/submit/submit.c
+++ b/src/modules/submit/submit.c
@@ -352,7 +352,7 @@ static int submit_setup(const til_settings_t *settings, til_setting_t **res_sett
if (res_setup) {
submit_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/swarm/swarm.c b/src/modules/swarm/swarm.c
index 78acc38..96b7e1c 100644
--- a/src/modules/swarm/swarm.c
+++ b/src/modules/swarm/swarm.c
@@ -439,7 +439,7 @@ static int swarm_setup(const til_settings_t *settings, til_setting_t **res_setti
if (res_setup) {
swarm_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/modules/voronoi/voronoi.c b/src/modules/voronoi/voronoi.c
index 5b86746..23ea00a 100644
--- a/src/modules/voronoi/voronoi.c
+++ b/src/modules/voronoi/voronoi.c
@@ -403,7 +403,7 @@ static int voronoi_setup(const til_settings_t *settings, til_setting_t **res_set
if (res_setup) {
voronoi_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
diff --git a/src/sdl_fb.c b/src/sdl_fb.c
index 24395a1..6d30064 100644
--- a/src/sdl_fb.c
+++ b/src/sdl_fb.c
@@ -102,7 +102,7 @@ static int sdl_fb_setup(const til_settings_t *settings, til_setting_t **res_sett
if (res_setup) {
sdl_fb_setup_t *setup;
- setup = til_setup_new(sizeof(*setup), (void(*)(til_setup_t *))free);
+ setup = til_setup_new(sizeof(*setup), NULL);
if (!setup)
return -ENOMEM;
© All Rights Reserved