Module Name:    src
Committed By:   nisimura
Date:           Fri Nov  8 03:56:10 UTC 2013

Modified Files:
        src/sys/dev/i2c: m41st84.c

Log Message:
fix an array bound error which was spotted by gcc 4.8


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/i2c/m41st84.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/m41st84.c
diff -u src/sys/dev/i2c/m41st84.c:1.18 src/sys/dev/i2c/m41st84.c:1.19
--- src/sys/dev/i2c/m41st84.c:1.18	Sat May 28 13:59:31 2011
+++ src/sys/dev/i2c/m41st84.c	Fri Nov  8 03:56:10 2013
@@ -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 *c
 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)) {

Reply via email to