[PATCH BlueZ v2 1/3] doc/hci-protocol: Fix missing & on mtu argument in BT_RCVMTU example
From: Zijun Hu
Date: Mon Aug 31 2026 - 01:40:21 EST
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