don't use variable 'newval' uninitialized when multiuser mode unchanged
This commit is contained in:
parent
2f425cfa36
commit
8097da4b67
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: audiotest.c,v 1.2 2020/02/12 07:02:21 martin Exp $ */
|
||||
/* $NetBSD: audiotest.c,v 1.3 2020/02/13 18:06:26 tnn Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 Tetsuya Isaki. All rights reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: audiotest.c,v 1.2 2020/02/12 07:02:21 martin Exp $");
|
||||
__RCSID("$NetBSD: audiotest.c,v 1.3 2020/02/13 18:06:26 tnn Exp $");
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -2331,6 +2331,8 @@ test_open_multiuser(int multiuser)
|
|||
r = SYSCTLBYNAME(mibname, NULL, NULL, &newval, sizeof(newval));
|
||||
REQUIRED_SYS_EQ(0, r);
|
||||
DPRINTF(" > new multiuser=%d\n", multiuser);
|
||||
} else {
|
||||
newval = oldval;
|
||||
}
|
||||
|
||||
/* Do test */
|
||||
|
@ -6109,6 +6111,8 @@ test_audioctl_open_multiuser(int multiuser, const char *dev1, const char *dev2)
|
|||
r = SYSCTLBYNAME(mibname, NULL, NULL, &newval, sizeof(newval));
|
||||
REQUIRED_SYS_EQ(0, r);
|
||||
DPRINTF(" > new multiuser=%d\n", multiuser);
|
||||
} else {
|
||||
newval = oldval;
|
||||
}
|
||||
|
||||
/* Do test */
|
||||
|
|
Loading…
Reference in New Issue