From 4b91abd2af3d2bb23458aff443e473a7e18e1d98 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 22 Apr 2015 11:39:04 +0000 Subject: [PATCH] Init a variable to zero so values aren't or'd into uninitialised memory. From jeundery at gmail dot com --- sys/arch/armv7/sunxi/sxiuart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/arch/armv7/sunxi/sxiuart.c b/sys/arch/armv7/sunxi/sxiuart.c index b2cddfde042..5a7136f0e43 100644 --- a/sys/arch/armv7/sunxi/sxiuart.c +++ b/sys/arch/armv7/sunxi/sxiuart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxiuart.c,v 1.3 2013/11/06 19:03:07 syl Exp $ */ +/* $OpenBSD: sxiuart.c,v 1.4 2015/04/22 11:39:04 jsg Exp $ */ /* * Copyright (c) 2005 Dale Rahn * Copyright (c) 2013 Artturi Alm @@ -306,8 +306,7 @@ sxiuart_param(struct tty *tp, struct termios *t) int error; tcflag_t oldcflag; uint16_t ratediv; - uint8_t lcr; - + uint8_t lcr = 0; if (t->c_ospeed < 0 || (t->c_ispeed && t->c_ispeed != t->c_ospeed)) return (EINVAL); -- 2.20.1