diff mbox series

[BlueZ,2/2] shared/bap: use only nonzero req->id

Message ID 7e5753e471757d50569802ddb19546768dea07f5.1688326228.git.pav@iki.fi (mailing list archive)
State Accepted
Commit 8fd0c76b41d35e24e10e45fcf57262482cb978a2
Headers show
Series [BlueZ,1/2] transport: handle BAP Enabling state correctly when resuming | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Pauli Virtanen July 2, 2023, 7:34 p.m. UTC
In bap_req_new, use same pattern as elsewhere to not use zero as
a valid id.
---
 src/shared/bap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 13c76afe6..72ce67c08 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -4303,7 +4303,7 @@  static struct bt_bap_req *bap_req_new(struct bt_bap_stream *stream,
 	static unsigned int id;
 
 	req = new0(struct bt_bap_req, 1);
-	req->id = ++id;
+	req->id = ++id ? id : ++id;
 	req->stream = stream;
 	req->op = op;
 	req->iov = util_iov_dup(iov, len);