]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
make count custom option define
authorBastian Dehn <hhaalo@arcor.de>
Thu, 22 Feb 2024 17:56:21 +0000 (18:56 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 22 Feb 2024 17:56:21 +0000 (18:56 +0100)
src/kds_s2000w_handler_opts.c

index 6c056d6f9a2f50b390a6819792f56c54ab0f1be8..acda69f06f5a47813f01eba7bd5e998c8b72dd4d 100644 (file)
@@ -4,6 +4,8 @@
 #include "kds_s2000w_client.h"
 #include "kds_s2000w_handler_opts.h"
 
+#define COUNT_CUSTOM_OPTIONS 7
+
 extern response* resp;
 extern json_object* resp_config;
 extern json_object* config;
@@ -120,7 +122,6 @@ void kds_s2000w_handler_get_option(void* handle, int option, void* value)
        json_object* value_object = NULL;
        switch(option) {
                case 0:
-                       const int COUNT_CUSTOM_OPTIONS = 7;
                        _load_options(h);
                        int* int_value_ptr = (int*) value;
                        *int_value_ptr = json_object_object_length(config) + COUNT_CUSTOM_OPTIONS;