summaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-11 19:30:04 -0400
committerDavid Robillard <d@drobilla.net>2016-07-11 20:03:13 -0400
commit05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf (patch)
treeff0f07004bf7430a9faeded9c2c6db77925f6309 /src/state.c
parent54f33b063642467adfe369fe1abd76c13af95734 (diff)
downloadlilv-05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf.tar.gz
lilv-05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf.tar.bz2
lilv-05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf.zip
Improve test coverage
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/state.c b/src/state.c
index 9bc1d6d..137d1a7 100644
--- a/src/state.c
+++ b/src/state.c
@@ -1,5 +1,5 @@
/*
- Copyright 2007-2015 David Robillard <http://drobilla.net>
+ Copyright 2007-2016 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -106,18 +106,18 @@ append_port_value(LilvState* state,
uint32_t size,
uint32_t type)
{
+ PortValue* pv = NULL;
if (value) {
state->values = (PortValue*)realloc(
state->values, (++state->n_values) * sizeof(PortValue));
- PortValue* pv = &state->values[state->n_values - 1];
+ pv = &state->values[state->n_values - 1];
pv->symbol = lilv_strdup(port_symbol);
pv->value = malloc(size);
pv->size = size;
pv->type = type;
memcpy(pv->value, value, size);
- return pv;
}
- return NULL;
+ return pv;
}
static const char*