test/bluetooth: sizeof() is not strlen()

sizeof(value) returns the size of the pointer, not the pointed string.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
tests/bluetooth/gatt/src/main.c
This commit is contained in:
Nicolas Pitre 2019-07-03 15:45:54 -04:00 committed by Johan Hedberg
commit 2dc6eea143

View file

@ -260,7 +260,7 @@ void test_gatt_write(void)
zassert_not_null(attr, "Attribute don't match");
ret = attr->write(NULL, attr, (void *)value, strlen(value), 0, 0);
zassert_equal(ret, sizeof(value), "Attribute write unexpected return");
zassert_equal(ret, strlen(value), "Attribute write unexpected return");
zassert_mem_equal(value, test_value, ret,
"Attribute write value don't match");
}