Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netbt pass the address of the field, instead of relying ...
details: https://anonhg.NetBSD.org/src/rev/eb1ca1126d00
branches: trunk
changeset: 969730:eb1ca1126d00
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Feb 29 11:40:06 2020 +0000
description:
pass the address of the field, instead of relying on it being the first
field of the structure/union, no functional change, discussed with plunky@
diffstat:
sys/netbt/l2cap_signal.c | 12 ++++++------
sys/netbt/rfcomm_session.c | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r c0544b89a053 -r eb1ca1126d00 sys/netbt/l2cap_signal.c
--- a/sys/netbt/l2cap_signal.c Sat Feb 29 11:03:44 2020 +0000
+++ b/sys/netbt/l2cap_signal.c Sat Feb 29 11:40:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: l2cap_signal.c,v 1.19 2018/08/21 14:59:13 plunky Exp $ */
+/* $NetBSD: l2cap_signal.c,v 1.20 2020/02/29 11:40:06 maxv Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.19 2018/08/21 14:59:13 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.20 2020/02/29 11:40:06 maxv Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -488,7 +488,7 @@
if (opt.length != L2CAP_OPT_MTU_SIZE)
goto reject;
- m_copydata(m, 0, L2CAP_OPT_MTU_SIZE, &val);
+ m_copydata(m, 0, L2CAP_OPT_MTU_SIZE, &val.mtu);
val.mtu = le16toh(val.mtu);
/*
@@ -539,7 +539,7 @@
* config request is merely advising us of their
* outgoing traffic flow, so be nice.
*/
- m_copydata(m, 0, L2CAP_OPT_QOS_SIZE, &val);
+ m_copydata(m, 0, L2CAP_OPT_QOS_SIZE, &val.qos);
switch (val.qos.service_type) {
case L2CAP_QOS_NO_TRAFFIC:
/*
@@ -729,7 +729,7 @@
if (opt.length != L2CAP_OPT_MTU_SIZE)
goto discon;
- m_copydata(m, 0, L2CAP_OPT_MTU_SIZE, &val);
+ m_copydata(m, 0, L2CAP_OPT_MTU_SIZE, &val.mtu);
chan->lc_imtu = le16toh(val.mtu);
if (chan->lc_imtu < L2CAP_MTU_MINIMUM)
chan->lc_imtu = L2CAP_MTU_DEFAULT;
@@ -759,7 +759,7 @@
* We don't support anything, but copy in the
* parameters if no action is good enough.
*/
- m_copydata(m, 0, L2CAP_OPT_QOS_SIZE, &val);
+ m_copydata(m, 0, L2CAP_OPT_QOS_SIZE, &val.qos);
switch (val.qos.service_type) {
case L2CAP_QOS_NO_TRAFFIC:
case L2CAP_QOS_BEST_EFFORT:
diff -r c0544b89a053 -r eb1ca1126d00 sys/netbt/rfcomm_session.c
--- a/sys/netbt/rfcomm_session.c Sat Feb 29 11:03:44 2020 +0000
+++ b/sys/netbt/rfcomm_session.c Sat Feb 29 11:40:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rfcomm_session.c,v 1.26 2020/02/23 20:16:10 plunky Exp $ */
+/* $NetBSD: rfcomm_session.c,v 1.27 2020/02/29 11:40:06 maxv Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.26 2020/02/23 20:16:10 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.27 2020/02/29 11:40:06 maxv Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1237,7 +1237,7 @@
rpn.param_mask = le16toh(rpn.param_mask);
} else if (m->m_pkthdr.len == 1) {
/* current settings request */
- m_copydata(m, 0, 1, &rpn);
+ m_copydata(m, 0, 1, &rpn.dlci);
rpn.param_mask = RFCOMM_RPN_PM_ALL;
} else {
DPRINTF("Bad RPN length (%d)\n", m->m_pkthdr.len);
Home |
Main Index |
Thread Index |
Old Index