From f6eb31162e647f7dcd5edda1e0961e09f5fe39e3 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Wed, 12 May 2021 02:24:56 +0000 Subject: [PATCH] vmd(8): omit a possibly uninitialized var in a log_warnx Don't print 'base' since it might not be initialized in all code paths. From James Cook --- usr.sbin/vmd/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/vmd/config.c b/usr.sbin/vmd/config.c index 46acf78ce8a..83c6c1e9b4d 100644 --- a/usr.sbin/vmd/config.c +++ b/usr.sbin/vmd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.61 2021/03/29 23:37:01 dv Exp $ */ +/* $OpenBSD: config.c,v 1.62 2021/05/12 02:24:56 mlarkin Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -386,8 +386,8 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid) break; if (n == -1) { log_warnx("vm \"%s\" unable to read " - "base %s for disk %s", vcp->vcp_name, - base, vcp->vcp_disks[i]); + "base for disk %s", vcp->vcp_name, + vcp->vcp_disks[i]); goto fail; } (void)strlcpy(path, base, sizeof(path)); -- 2.20.1