Source-Changes-HG archive

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

[src/trunk]: src/sys/kern pass the address of the field, instead of relying o...



details:   https://anonhg.NetBSD.org/src/rev/2332cd44d40d
branches:  trunk
changeset: 745056:2332cd44d40d
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Feb 22 09:24:05 2020 +0000

description:
pass the address of the field, instead of relying on it being the first
field of the structure, no functional change, ok kamil

diffstat:

 sys/kern/sys_ptrace_common.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r c8a128afd68c -r 2332cd44d40d sys/kern/sys_ptrace_common.c
--- a/sys/kern/sys_ptrace_common.c      Sat Feb 22 08:58:39 2020 +0000
+++ b/sys/kern/sys_ptrace_common.c      Sat Feb 22 09:24:05 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_ptrace_common.c,v 1.77 2020/01/03 00:37:29 kamil Exp $     */
+/*     $NetBSD: sys_ptrace_common.c,v 1.78 2020/02/22 09:24:05 maxv Exp $      */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.77 2020/01/03 00:37:29 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.78 2020/02/22 09:24:05 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ptrace.h"
@@ -804,7 +804,7 @@
                        __func__, sizeof(lwpid_t), data, sizeof(pls)));
                return EINVAL;
        }
-       error = copyin(addr, &pls, sizeof(lwpid_t));
+       error = copyin(addr, &pls.pl_lwpid, sizeof(lwpid_t));
        if (error)
                return error;
 



Home | Main Index | Thread Index | Old Index