Bluetooth: Controller: Fix suspicious use of sizeof
Fix Coverity, sizeof not portable, defect; by explicitly using sizeof(void *). suspicious_sizeof: Passing argument mem_head of type void ** and argument 4U /* sizeof (mem_head) */ to function memcpy is suspicious. In this case, sizeof (void **) is equal to sizeof (void *), but this is not a portable assumption. Change-id: I4b4776466e16020876500feba0141985b8581017 Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
26f6b71a8e
commit
e9b818e763
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ void *mem_acquire(void **mem_head)
|
|||
free_count--;
|
||||
|
||||
mem = *mem_head;
|
||||
memcpy(mem_head, mem, sizeof(mem_head));
|
||||
memcpy(mem_head, mem, sizeof(*mem_head));
|
||||
|
||||
/* Store free mem_count after the list's next pointer */
|
||||
if (*mem_head) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue