Bluetooth: GATT: Fix dereference after NULL check
This fixes the coverity problem which which in fact is a non-issue as the code would assert before reaching that line which makes the NULL pointer check useless so this removes it. Fixes #18431 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
2f91f1323d
commit
6c8eebe046
|
@ -234,10 +234,8 @@ void test_gatt_read(void)
|
|||
&test_chrc_uuid.uuid, NULL, 0, find_attr,
|
||||
&attr);
|
||||
zassert_not_null(attr, "Attribute don't match");
|
||||
if (attr) {
|
||||
zassert_equal(attr->uuid, &test_chrc_uuid.uuid,
|
||||
zassert_equal(attr->uuid, &test_chrc_uuid.uuid,
|
||||
"Attribute UUID don't match");
|
||||
}
|
||||
|
||||
ret = attr->read(NULL, attr, (void *)buf, sizeof(buf), 0);
|
||||
zassert_equal(ret, strlen(test_value),
|
||||
|
|
Loading…
Reference in a new issue