aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_node.c
diff options
context:
space:
mode:
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);
}