Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/0bb543e55e11
branches:  trunk
changeset: 745057:0bb543e55e11
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Feb 22 09:30:42 2020 +0000

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

diffstat:

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

diffs (27 lines):

diff -r 2332cd44d40d -r 0bb543e55e11 sys/net/rtsock_shared.c
--- a/sys/net/rtsock_shared.c   Sat Feb 22 09:24:05 2020 +0000
+++ b/sys/net/rtsock_shared.c   Sat Feb 22 09:30:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock_shared.c,v 1.14 2020/02/09 21:15:03 roy Exp $   */
+/*     $NetBSD: rtsock_shared.c,v 1.15 2020/02/22 09:30:42 maxv Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.14 2020/02/09 21:15:03 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.15 2020/02/22 09:30:42 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -248,7 +248,7 @@
                    offsetof(struct sockaddr, sa_len) + sizeof(ss.ss_len))
                        return EINVAL;
                m_copydata(m, sizeof(*rtm) + offsetof(struct sockaddr, sa_len),
-                   sizeof(ss.ss_len), &ss);
+                   sizeof(ss.ss_len), &ss.ss_len);
                if (m->m_pkthdr.len < sizeof(*rtm) + ss.ss_len)
                        return EINVAL;
                /* Copy out the destination sockaddr */



Home | Main Index | Thread Index | Old Index