Module Name: src Committed By: christos Date: Mon Nov 4 16:52:08 UTC 2013
Modified Files: src/sys/compat/osf1: osf1_cvt.c Log Message: fix incorrect sizes to memset To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/compat/osf1/osf1_cvt.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/compat/osf1/osf1_cvt.c diff -u src/sys/compat/osf1/osf1_cvt.c:1.27 src/sys/compat/osf1/osf1_cvt.c:1.28 --- src/sys/compat/osf1/osf1_cvt.c:1.27 Fri Apr 23 11:19:20 2010 +++ src/sys/compat/osf1/osf1_cvt.c Mon Nov 4 11:52:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_cvt.c,v 1.27 2010/04/23 15:19:20 rmind Exp $ */ +/* $NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: osf1_cvt.c,v 1.27 2010/04/23 15:19:20 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -293,7 +293,7 @@ void osf1_cvt_flock_from_native(const struct flock *nf, struct osf1_flock *of) { - memset(of, 0, sizeof of); + memset(of, 0, sizeof(*of)); of->l_start = nf->l_start; of->l_len = nf->l_len; @@ -332,7 +332,7 @@ int osf1_cvt_flock_to_native(const struct osf1_flock *of, struct flock *nf) { - memset(nf, 0, sizeof nf); + memset(nf, 0, sizeof(*nf)); nf->l_start = of->l_start; nf->l_len = of->l_len; @@ -380,7 +380,7 @@ osf1_cvt_msghdr_xopen_to_native(const st { unsigned long leftovers; - memset(bmh, 0, sizeof bmh); + memset(bmh, 0, sizeof(*bmh)); bmh->msg_name = omh->msg_name; /* XXX sockaddr translation */ bmh->msg_namelen = omh->msg_namelen; bmh->msg_iov = NULL; /* iovec xlation separate */