mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 00:34:39 +08:00
emulator: Fix uninitiailzed scalar variable
This patch fixes the uninitiailzed varialble(CWE-457) reported by the Coverity scan.
This commit is contained in:
parent
927059ba60
commit
1722bf1258
@ -1570,6 +1570,7 @@ static void rfcomm_sabm_send(struct bthost *bthost, struct btconn *conn,
|
||||
{
|
||||
struct rfcomm_cmd cmd;
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.address = RFCOMM_ADDR(cr, dlci);
|
||||
cmd.control = RFCOMM_CTRL(RFCOMM_SABM, 1);
|
||||
cmd.length = RFCOMM_LEN8(0);
|
||||
@ -2123,6 +2124,7 @@ static void rfcomm_ua_send(struct bthost *bthost, struct btconn *conn,
|
||||
{
|
||||
struct rfcomm_cmd cmd;
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.address = RFCOMM_ADDR(cr, dlci);
|
||||
cmd.control = RFCOMM_CTRL(RFCOMM_UA, 1);
|
||||
cmd.length = RFCOMM_LEN8(0);
|
||||
@ -2136,6 +2138,7 @@ static void rfcomm_dm_send(struct bthost *bthost, struct btconn *conn,
|
||||
{
|
||||
struct rfcomm_cmd cmd;
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.address = RFCOMM_ADDR(cr, dlci);
|
||||
cmd.control = RFCOMM_CTRL(RFCOMM_DM, 1);
|
||||
cmd.length = RFCOMM_LEN8(0);
|
||||
|
Loading…
Reference in New Issue
Block a user