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 v2 1/3] doc/hci-protocol: Fix missing & on mtu argument in BT_RCVMTU example
Date: Sun, 30 Aug 2026 22:39:29 -0700	[thread overview]
Message-ID: <20260830-vendor_hci-v2-1-9903760957ab@oss.qualcomm.com> (raw)
In-Reply-To: <20260830-vendor_hci-v2-0-9903760957ab@oss.qualcomm.com>

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

Fix by using &mtu instead of mtu.

---
Changes since previous version:
- Improve the commit title and message
---
 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-08-31  5:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  5:39 [PATCH BlueZ v2 0/3] BlueZ: Support vendor HCI packets Zijun Hu
2026-08-31  5:39 ` Zijun Hu [this message]
2026-08-31  8:05   ` bluez.test.bot
2026-08-31  5:39 ` [PATCH BlueZ v2 2/3] doc/hci-protocol: Add BT_RECV_VENDOR_PKT socket option for HCI_CHANNEL_USER Zijun Hu
2026-08-31  5:39 ` [PATCH BlueZ v2 3/3] monitor: Support vendor HCI packets Zijun Hu
2026-08-31 14:52   ` Luiz Augusto von Dentz

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=20260830-vendor_hci-v2-1-9903760957ab@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