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/test_plugin.lv2/test_plugin.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'test/test_plugin.lv2/test_plugin.c') diff --git a/test/test_plugin.lv2/test_plugin.c b/test/test_plugin.lv2/test_plugin.c index 582fd9b..d2906d6 100644 --- a/test/test_plugin.lv2/test_plugin.c +++ b/test/test_plugin.lv2/test_plugin.c @@ -458,10 +458,5 @@ LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index) { - switch (index) { - case 0: - return &descriptor; - default: - return NULL; - } + return index ? NULL : &descriptor; } -- cgit v1.2.1