--- a/src/ledctl/ledctl.c +++ b/src/ledctl/ledctl.c @@ -230,7 +230,7 @@ * * @return The function does not return a value. */ -static void _ledctl_fini(int _i, void *_arg) +static void _ledctl_fini(void) { led_free(ctx); list_erase(&ibpi_list); @@ -1169,7 +1169,7 @@ if (status != LED_STATUS_SUCCESS) return status; - if (on_exit(_ledctl_fini, progname)) + if (atexit(_ledctl_fini)) exit(LED_STATUS_ONEXIT_ERROR); status = _read_shared_conf();