From: Vladimír Čunát Date: Mon, 24 Jun 2019 12:34:17 +0000 (+0200) Subject: modules/sd_watchdog nitpicks: simplify X-Git-Tag: v4.1.0~17^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94dc55afec9494601a0f88b74a4b78841f379df5;p=thirdparty%2Fknot-resolver.git modules/sd_watchdog nitpicks: simplify --- diff --git a/modules/sd_watchdog/sd_watchdog.c b/modules/sd_watchdog/sd_watchdog.c index 959814467..bdf6f51f4 100644 --- a/modules/sd_watchdog/sd_watchdog.c +++ b/modules/sd_watchdog/sd_watchdog.c @@ -23,16 +23,10 @@ static void keepalive_ping(uv_timer_t *timer) KR_EXPORT int sd_watchdog_init(struct kr_module *module) { - static kr_layer_api_t layer = { 0 }; - layer.data = module; - module->layer = &layer; - module->props = NULL; - - struct watchdog_config *conf = malloc(sizeof(*conf)); + struct watchdog_config *conf = calloc(1, sizeof(*conf)); if (!conf) { return kr_error(ENOMEM); } - memset(conf, 0, sizeof(*conf)); module->data = conf; /* Check if watchdog is enabled */