Linux bluetooth development
 help / color / mirror / Atom feed
From: Zijun Hu <zijun.hu@oss.qualcomm.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Zijun Hu <zijun_hu@icloud.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH BlueZ v3 1/4] doc/hci-protocol: Fix missing & on mtu argument in BT_RCVMTU example
Date: Thu, 03 Sep 2026 07:47:13 -0700	[thread overview]
Message-ID: <20260903-vendor_hci-v3-1-015d62a57c91@oss.qualcomm.com> (raw)
In-Reply-To: <20260903-vendor_hci-v3-0-015d62a57c91@oss.qualcomm.com>

getsockopt() requires a pointer argument, but mtu was passed by value.

Fix by using &mtu instead of mtu.
---
 doc/hci-protocol.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/hci-protocol.rst b/doc/hci-protocol.rst
index f28684655842..db10b35df736 100644
--- a/doc/hci-protocol.rst
+++ b/doc/hci-protocol.rst
@@ -129,17 +129,17 @@ Example:
 
 .. code-block::
 
     uint16_t mtu;
     socklen_t len;
     int err;
 
     len = sizeof(mtu);
-    err = getsockopt(sock, SOL_BLUETOOTH, BT_RCVMTU, mtu, &len);
+    err = getsockopt(sock, SOL_BLUETOOTH, BT_RCVMTU, &mtu, &len);
 
 RESOURCES
 =========
 
 http://www.bluez.org
 
 REPORTING BUGS
 ==============

-- 
2.34.1


  reply	other threads:[~2026-09-03 14:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 14:47 [PATCH BlueZ v3 0/4] BlueZ: Support vendor packets Zijun Hu
2026-09-03 14:47 ` Zijun Hu [this message]
2026-09-03 15:53   ` bluez.test.bot
2026-09-03 14:47 ` [PATCH BlueZ v3 2/4] monitor: s/vendor_(evt|event)/\1_vendor/ Zijun Hu
2026-09-03 14:47 ` [PATCH BlueZ v3 3/4] doc/hci-protocol: Add BT_RECV_VENDOR_PKT socket option for HCI_CHANNEL_USER Zijun Hu
2026-09-03 15:16   ` Luiz Augusto von Dentz
2026-09-04 14:12     ` Zijun Hu
2026-09-04 14:31       ` Luiz Augusto von Dentz
2026-09-03 14:47 ` [PATCH BlueZ v3 4/4] monitor: Support vendor packets Zijun Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260903-vendor_hci-v3-1-015d62a57c91@oss.qualcomm.com \
    --to=zijun.hu@oss.qualcomm.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=zijun_hu@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox