Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c fix an array bound error which was spotted by gc...
details: https://anonhg.NetBSD.org/src/rev/c4c4af7f7de5
branches: trunk
changeset: 791201:c4c4af7f7de5
user: nisimura <nisimura%NetBSD.org@localhost>
date: Fri Nov 08 03:56:10 2013 +0000
description:
fix an array bound error which was spotted by gcc 4.8
diffstat:
sys/dev/i2c/m41st84.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c31851e73c20 -r c4c4af7f7de5 sys/dev/i2c/m41st84.c
--- a/sys/dev/i2c/m41st84.c Fri Nov 08 03:13:29 2013 +0000
+++ b/sys/dev/i2c/m41st84.c Fri Nov 08 03:56:10 2013 +0000
@@ -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 @@
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)) {
Home |
Main Index |
Thread Index |
Old Index