NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/46372: Correct use of sizeof in mm58167.c
>Number: 46372
>Category: kern
>Synopsis: Correct use of sizeof in mm58167.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 25 08:05:00 +0000 2012
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Correct use of sizeof in mm58167.c .
>How-To-Repeat:
>Fix:
diff -u -p -r1.14 mm58167.c
--- sys/dev/ic/mm58167.c 12 Dec 2009 16:12:05 -0000 1.14
+++ sys/dev/ic/mm58167.c 22 Apr 2012 09:10:44 -0000
@@ -68,7 +68,7 @@ mm58167_attach(struct mm58167_softc *sc)
aprint_normal(": mm58167");
handle = &sc->_mm58167_todr_handle;
- memset(handle, 0, sizeof(handle));
+ memset(handle, 0, sizeof(*handle));
handle->cookie = sc;
handle->todr_gettime_ymdhms = mm58167_gettime_ymdhms;
handle->todr_settime_ymdhms = mm58167_settime_ymdhms;
Home |
Main Index |
Thread Index |
Old Index