summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authornisimura <nisimura@NetBSD.org>2013-11-08 03:56:10 +0000
committernisimura <nisimura@NetBSD.org>2013-11-08 03:56:10 +0000
commit435b38bc1c45105900122bd0987be97f12e55dbe (patch)
tree954dc87e6d5abfab6f1617ab6160c12d5edf2f74 /sys/dev
parent65bf6a7ab11ee577ba78758906d20057a6d235d1 (diff)
fix an array bound error which was spotted by gcc 4.8
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/m41st84.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/i2c/m41st84.c b/sys/dev/i2c/m41st84.c
index 307c011b005..0420a2e77e5 100644
--- a/sys/dev/i2c/m41st84.c
+++ b/sys/dev/i2c/m41st84.c
@@ -1,4 +1,4 @@
-/* $NetBSD: m41st84.c,v 1.18 2011/05/28 13:59:31 phx Exp $ */
+/* $NetBSD: m41st84.c,v 1.19 2013/11/08 03:56:10 nisimura Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.18 2011/05/28 13:59:31 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.19 2013/11/08 03:56:10 nisimura Exp $");
#include "opt_strtc.h"
@@ -282,7 +282,7 @@ strtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
static int
strtc_clock_read(struct strtc_softc *sc, struct clock_ymdhms *dt)
{
- u_int8_t bcd[M41ST84_REG_DATE_BYTES], cmdbuf[1];
+ u_int8_t bcd[M41ST84_REG_DATE_BYTES], cmdbuf[2];
int i;
if (iic_acquire_bus(sc->sc_tag, I2C_F_POLL)) {