diff mbox series

[BlueZ,v1] shared/vcp: Fix build error

Message ID 20231130141040.2243867-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v1] shared/vcp: Fix build error | expand

Commit Message

Luiz Augusto von Dentz Nov. 30, 2023, 2:10 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This fixes the following build error in some architectures:

src/shared/vcp.c:961:24: error: lvalue required as unary ‘&’ operand
 961 |     iov.iov_base = &cpu_to_le32(vocs->vocs_audio_loc);
   |            ^
---
 src/shared/vcp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/src/shared/vcp.c b/src/shared/vcp.c
index f2c04d184a08..06a22997a95c 100644
--- a/src/shared/vcp.c
+++ b/src/shared/vcp.c
@@ -956,13 +956,12 @@  static void vocs_voal_read(struct gatt_db_attribute *attrib,
 				void *user_data)
 {
 	struct bt_vocs *vocs = user_data;
-	struct iovec iov;
+	uint32_t loc;
 
-	iov.iov_base = &cpu_to_le32(vocs->vocs_audio_loc);
-	iov.iov_len = sizeof(vocs->vocs_audio_loc);
+	loc = cpu_to_le32(vocs->vocs_audio_loc);
 
-	gatt_db_attribute_read_result(attrib, id, 0, iov.iov_base,
-							iov.iov_len);
+	gatt_db_attribute_read_result(attrib, id, 0, (void *)&loc,
+							sizeof(loc));
 }
 
 static void vocs_voaodec_read(struct gatt_db_attribute *attrib,