diff options
author | David Robillard <d@drobilla.net> | 2020-12-16 16:49:57 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-16 16:49:57 +0100 |
commit | bbff4459368ea25f1ae1ee3452a5b5c5dcd64e06 (patch) | |
tree | efc1fb7fd89f9e36d34d15a94482706e5c445b0c /plugins/eg-sampler.lv2/sampler.c | |
parent | 37ec8d59b349b9b735b58134a72e7372f36345dc (diff) | |
download | lv2-bbff4459368ea25f1ae1ee3452a5b5c5dcd64e06.tar.xz |
Isolate variable declarations and initialize all variables
Diffstat (limited to 'plugins/eg-sampler.lv2/sampler.c')
-rw-r--r-- | plugins/eg-sampler.lv2/sampler.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c index 1ed23fa..a3b2e7d 100644 --- a/plugins/eg-sampler.lv2/sampler.c +++ b/plugins/eg-sampler.lv2/sampler.c @@ -521,11 +521,11 @@ restore(LV2_Handle instance, } // Get eg:sample from state - size_t size; - uint32_t type; - uint32_t valflags; - const void* value = retrieve(handle, self->uris.eg_sample, - &size, &type, &valflags); + size_t size = 0; + uint32_t type = 0; + uint32_t valflags = 0; + const void* value = retrieve(handle, self->uris.eg_sample, + &size, &type, &valflags); if (!value) { lv2_log_error(&self->logger, "Missing eg:sample\n"); return LV2_STATE_ERR_NO_PROPERTY; |