summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-06-25 12:37:06 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-06-25 12:37:06 +0000
commitf89a3d013c96255d2f7b0c5f7e3ea0f42feaef61 (patch)
tree028662295ef3bc554a4c476de2adb0f4f59b78b1 /sys
parent9995fadede65060f7732168c87274d0cd630faf8 (diff)
avoid uninitialised var access
Cody Cutler author of ukspan(4) agrees ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ukspan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/ukspan.c b/sys/dev/usb/ukspan.c
index 5f5e9583641..190af61c565 100644
--- a/sys/dev/usb/ukspan.c
+++ b/sys/dev/usb/ukspan.c
@@ -507,8 +507,8 @@ ukspan_param(void *addr, int portno, struct termios *ti)
cmsg->rxmode = cmsg->txmode = 0;
/* Set parity, data, and stop bits */
+ cflag = ti->c_cflag;
if ((cflag & CIGNORE) == 0) {
- cflag = ti->c_cflag;
if (cflag & PARENB)
lcr = (cflag & PARODD) ? UKSPAN_PARITY_ODD :
UKSPAN_PARITY_EVEN;