aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-13 15:21:34 +0100
committerDavid Robillard <d@drobilla.net>2020-11-13 15:21:34 +0100
commitd63f832e64b8b7faf14575584e356533be349280 (patch)
treec7ab863843a36d0d7c7264aed398e665995a0c0b /test/test_node.c
parentce9ee54f217b662725d24ddc077f006b45dbdf43 (diff)
downloadserd-d63f832e64b8b7faf14575584e356533be349280.tar.gz
serd-d63f832e64b8b7faf14575584e356533be349280.tar.bz2
serd-d63f832e64b8b7faf14575584e356533be349280.zip
Remove tests that pass null to nonnull parameters
Diffstat (limited to 'test/test_node.c')
-rw-r--r--test/test_node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_node.c b/test/test_node.c
index 1d6ad2c5..45c40aa4 100644
--- a/test/test_node.c
+++ b/test/test_node.c
@@ -115,8 +115,8 @@ test_integer_to_node(void)
static void
test_blob_to_node(void)
{
- for (size_t size = 0; size < 256; ++size) {
- uint8_t* data = size > 0 ? (uint8_t*)malloc(size) : NULL;
+ for (size_t size = 1; size < 256; ++size) {
+ uint8_t* const data = (uint8_t*)malloc(size);
for (size_t i = 0; i < size; ++i) {
data[i] = (uint8_t)((size + i) % 256);
}