forked from nuttx/nuttx-update
mm/mm_gran: fix compile warnings
mm_gran/mm_grantable.c:187:6: error: 'r.sidx' may be used uninitialized Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
8c98194182
commit
5609c3d416
1 changed files with 4 additions and 1 deletions
|
@ -174,7 +174,10 @@ bool gran_match(const gran_t *gran, size_t posi, size_t size, bool used,
|
|||
uint32_t e; /* expected cell value */
|
||||
gatr_t r; /* range helper */
|
||||
|
||||
gran_range(gran, posi, size, &r);
|
||||
if (gran_range(gran, posi, size, &r) < 0)
|
||||
{
|
||||
memset(&r, 0, sizeof(r));
|
||||
}
|
||||
|
||||
/* check the ending cell */
|
||||
|
||||
|
|
Loading…
Reference in a new issue