diff options
author | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2009-04-26 02:25:37 +0000 |
---|---|---|
committer | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2009-04-26 02:25:37 +0000 |
commit | 9dc24f324fff2330a88c9356759cc7e399a8023c (patch) | |
tree | e552b292c4da61ff8d932cf844d8f8beea37ade2 /sys/kern | |
parent | d344f77a9af3c3c22eb56bc584b6c9aaf65c605c (diff) |
don't zero sensor .value and .flags immediately after the allocation w/ M_ZERO; ok deraadt
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_msts.c | 3 | ||||
-rw-r--r-- | sys/kern/tty_nmea.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/tty_msts.c b/sys/kern/tty_msts.c index 25e7771c18d..960d0d3515f 100644 --- a/sys/kern/tty_msts.c +++ b/sys/kern/tty_msts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_msts.c,v 1.12 2009/01/12 16:45:38 stevesk Exp $ */ +/* $OpenBSD: tty_msts.c,v 1.13 2009/04/26 02:25:36 cnst Exp $ */ /* * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> @@ -110,7 +110,6 @@ mstsopen(dev_t dev, struct tty *tp) np->signal.type = SENSOR_PERCENT; np->signal.status = SENSOR_S_UNKNOWN; np->signal.value = 100000LL; - np->signal.flags = 0; strlcpy(np->signal.desc, "Signal", sizeof(np->signal.desc)); sensor_attach(&np->timedev, &np->signal); diff --git a/sys/kern/tty_nmea.c b/sys/kern/tty_nmea.c index 38332e3ef22..12889644e20 100644 --- a/sys/kern/tty_nmea.c +++ b/sys/kern/tty_nmea.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_nmea.c,v 1.33 2008/12/25 21:25:55 stevesk Exp $ */ +/* $OpenBSD: tty_nmea.c,v 1.34 2009/04/26 02:25:36 cnst Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org> @@ -107,13 +107,11 @@ nmeaopen(dev_t dev, struct tty *tp) nmea_count++; np->time.status = SENSOR_S_UNKNOWN; np->time.type = SENSOR_TIMEDELTA; - np->time.value = 0LL; sensor_attach(&np->timedev, &np->time); np->signal.type = SENSOR_PERCENT; np->signal.status = SENSOR_S_UNKNOWN; np->signal.value = 100000LL; - np->signal.flags = 0; strlcpy(np->signal.desc, "Signal", sizeof(np->signal.desc)); sensor_attach(&np->timedev, &np->signal); |