From 6acea849c9287373e5c579e88c4e9ef7ddac1bf7 Mon Sep 17 00:00:00 2001 From: tobhe Date: Thu, 25 Nov 2021 18:28:51 +0000 Subject: [PATCH] Silence unitialized variable warnings. --- sbin/iked/ca.c | 4 ++-- sbin/iked/config.c | 4 ++-- sbin/iked/iked.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c index c7ea248dbd2..4af8a708a09 100644 --- a/sbin/iked/ca.c +++ b/sbin/iked/ca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ca.c,v 1.79 2021/11/21 22:44:08 tobhe Exp $ */ +/* $OpenBSD: ca.c,v 1.80 2021/11/25 18:28:51 tobhe Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -146,7 +146,7 @@ ca_getkey(struct privsep *ps, struct iked_id *key, enum imsg_type type) { struct iked *env = ps->ps_env; struct ca_store *store = env->sc_priv; - struct iked_id *id; + struct iked_id *id = NULL; const char *name; if (store == NULL) diff --git a/sbin/iked/config.c b/sbin/iked/config.c index e745da5b22b..878be2a3715 100644 --- a/sbin/iked/config.c +++ b/sbin/iked/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.83 2021/11/24 20:48:00 tobhe Exp $ */ +/* $OpenBSD: config.c,v 1.84 2021/11/25 18:28:51 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -593,7 +593,7 @@ int config_getsocket(struct iked *env, struct imsg *imsg, void (*cb)(int, short, void *)) { - struct iked_socket *sock, **sock0, **sock1; + struct iked_socket *sock, **sock0 = NULL, **sock1 = NULL; log_debug("%s: received socket fd %d", __func__, imsg->fd); diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c index 4cd1320822d..fa7fd3d5c6a 100644 --- a/sbin/iked/iked.c +++ b/sbin/iked/iked.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.c,v 1.58 2021/09/01 15:30:06 tobhe Exp $ */ +/* $OpenBSD: iked.c,v 1.59 2021/11/25 18:28:51 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -350,7 +350,7 @@ parent_sig_handler(int sig, short event, void *arg) /* FALLTHROUGH */ case SIGCHLD: do { - int len; + int len = 0; pid = waitpid(-1, &status, WNOHANG); if (pid <= 0) -- 2.20.1