Commit 94dc55af authored by Vladimír Čunát's avatar Vladimír Čunát

modules/sd_watchdog nitpicks: simplify

parent dc8422a4
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment