Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern We already zeroed the struct, no point in zeroing t...



details:   https://anonhg.NetBSD.org/src/rev/87b5b1b26abd
branches:  trunk
changeset: 937871:87b5b1b26abd
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Aug 28 10:20:14 2020 +0000

description:
We already zeroed the struct, no point in zeroing things twice.

diffstat:

 sys/kern/kern_descrip.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 0c0e1de5d6a2 -r 87b5b1b26abd sys/kern/kern_descrip.c
--- a/sys/kern/kern_descrip.c   Fri Aug 28 07:29:12 2020 +0000
+++ b/sys/kern/kern_descrip.c   Fri Aug 28 10:20:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_descrip.c,v 1.248 2020/08/28 06:47:18 riastradh Exp $     */
+/*     $NetBSD: kern_descrip.c,v 1.249 2020/08/28 10:20:14 christos Exp $      */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.248 2020/08/28 06:47:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.249 2020/08/28 10:20:14 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2309,7 +2309,6 @@
        COND_SET_CPTR(fp->f_ops, fpsrc->f_ops, allowaddr);
        COND_SET_STRUCT(fp->f_undata, fpsrc->f_undata, allowaddr);
        COND_SET_STRUCT(fp->f_list, fpsrc->f_list, allowaddr);
-       memset(&fp->f_lock, 0, sizeof(fp->f_lock));
        fp->f_flag = fpsrc->f_flag;
        fp->f_marker = fpsrc->f_marker;
        fp->f_type = fpsrc->f_type;



Home | Main Index | Thread Index | Old Index