From: Bastian Dehn Date: Tue, 23 Sep 2025 15:27:29 +0000 (+0200) Subject: change load profile with switch case X-Git-Tag: v1.1.6^2~1^2~2 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=ef92888a036024c4ea0bbc0eef628b52f9e63b32;p=sane-kds-s2000w-net.git change load profile with switch case --- diff --git a/src/kds_s2000w_option_descriptors.c b/src/kds_s2000w_option_descriptors.c index 78a0fa2..490642e 100644 --- a/src/kds_s2000w_option_descriptors.c +++ b/src/kds_s2000w_option_descriptors.c @@ -1311,17 +1311,17 @@ void kds_s2000w_option_descriptors_init(uint8_t profile) { kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptors_init"); - if (profile == PROFILE_FULL) { + switch (profile) { + case PROFILE_FULL: _kds_s2000w_option_descriptors_init_full_profile(); - return; - } - - if (profile == PROFILE_230802_V1_0_36) { + break; + case PROFILE_230802_V1_0_36: _kds_s2000w_option_descriptors_init_230802_v1_0_36_profile(); - return; + break; + default: + _kds_s2000w_option_descriptors_init_min_profile(); + break; } - - _kds_s2000w_option_descriptors_init_min_profile(); } void kds_s2000w_option_descriptors_free()