From 3f209ff081bbcf0f15a3acfcb04b3371011f9f9d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 10 Dec 2022 16:45:27 -0500 Subject: Simplify trivial switch statements --- test/lib_descriptor.lv2/lib_descriptor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'test/lib_descriptor.lv2/lib_descriptor.c') diff --git a/test/lib_descriptor.lv2/lib_descriptor.c b/test/lib_descriptor.lv2/lib_descriptor.c index 652ba8f..bae1659 100644 --- a/test/lib_descriptor.lv2/lib_descriptor.c +++ b/test/lib_descriptor.lv2/lib_descriptor.c @@ -82,12 +82,7 @@ get_plugin(LV2_Lib_Handle handle, uint32_t index) { (void)handle; - switch (index) { - case 0: - return &descriptor; - default: - return NULL; - } + return index ? NULL : &descriptor; } static const LV2_Lib_Descriptor lib = {NULL, -- cgit v1.2.1