Bluetooth: Audio: Remove zero-ing of variable
Commit dc812539b8
("Bluetooth: MPL: Fix use of uninitialized
command.param value") fixed the use of a potentially un-initialized
variable, by
- splitting a log statement, so that the variable is only
logged (=used) if in use (and therefore hopefully also initialized)
- setting the variable to zero if not in use
The second part is not required, as all other code in the module
checks whether the variable is in use before using it. And this
second part also prevents the parent struct from being made 'const'.
This commits removes the zeroing of the variable, so that the struct
can be made 'const'.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
This commit is contained in:
parent
fa5b8a1e38
commit
1d66729a0a
1 changed files with 0 additions and 1 deletions
|
@ -2589,7 +2589,6 @@ void send_command(struct mpl_cmd command)
|
|||
if (command.use_param) {
|
||||
BT_DBG("opcode: %d, param: %d", command.opcode, command.param);
|
||||
} else {
|
||||
command.param = 0; /* ensure that is set to 0 if not used */
|
||||
BT_DBG("opcode: %d", command.opcode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue