]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change method debug with __func__
authorBastian Dehn <hhaalo@arcor.de>
Tue, 5 May 2026 12:01:48 +0000 (14:01 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 5 May 2026 12:10:45 +0000 (14:10 +0200)
src/kds_s2000w_client.c
src/kds_s2000w_handler.c
src/kds_s2000w_image_converter_magick.c
src/kds_s2000w_image_converter_netpbm.c
src/kds_s2000w_net.c

index 8477524c0b24d3e678addb7bbf6c98a130a0b47e..c004d8eccc5054ce060fddde891831209ba9db77 100644 (file)
@@ -241,7 +241,7 @@ char* _kds_s2000w_client_append_image_number_to_str(uint8_t image_number, const
 
 void kds_s2000w_client_init(const client_config_t* config)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_init");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        kds_s2000w_client_config = malloc(sizeof(client_config_t));
        kds_s2000w_client_config->scanner_url = _kds_s2000w_client_strdup(config->scanner_url);
@@ -253,7 +253,7 @@ void kds_s2000w_client_init(const client_config_t* config)
 
 void kds_s2000w_client_free()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_free");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        free(kds_s2000w_client_config->scanner_url);
        kds_s2000w_client_config->scanner_url = NULL;
@@ -266,7 +266,7 @@ void kds_s2000w_client_free()
 
 response_t* kds_s2000w_client_response_init()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_response_init");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        response_t* resp = malloc(sizeof(response_t));
        if (resp == NULL)
@@ -281,7 +281,7 @@ response_t* kds_s2000w_client_response_init()
 
 void kds_s2000w_client_response_free(response_t* resp)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_response_free");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (resp == NULL)
                return;
@@ -293,7 +293,7 @@ void kds_s2000w_client_response_free(response_t* resp)
 
 uint8_t kds_s2000w_client_open_session(response_t* resp)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_open_session");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(0);
        if (param == NULL)
@@ -330,7 +330,7 @@ uint8_t kds_s2000w_client_open_session(response_t* resp)
 
 void kds_s2000w_client_close_session(int64_t sessionid)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_close_session");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(sessionid);
        if (param == NULL)
@@ -352,7 +352,7 @@ void kds_s2000w_client_close_session(int64_t sessionid)
 
 uint8_t kds_s2000w_client_get_capabilities(response_t* resp)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_get_capabilities");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(0);
        if (param == NULL)
@@ -380,7 +380,7 @@ uint8_t kds_s2000w_client_get_capabilities(response_t* resp)
 
 uint8_t kds_s2000w_client_status_session(int64_t sessionid, response_t* resp)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_status_session");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        kds_s2000w_heartbeat_join_thread();
        kds_s2000w_heartbeat_wait_seconds(&kds_s2000w_client_config->heartbeat);
@@ -410,7 +410,7 @@ uint8_t kds_s2000w_client_status_session(int64_t sessionid, response_t* resp)
 
 uint8_t kds_s2000w_client_start_scan(int64_t sessionid)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_start_scan");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(sessionid);
        if (param == NULL)
@@ -436,7 +436,7 @@ uint8_t kds_s2000w_client_start_scan(int64_t sessionid)
 
 uint8_t kds_s2000w_client_stop_scan(int64_t sessionid)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_stop_scan");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(sessionid);
        if (param == NULL)
@@ -462,7 +462,7 @@ uint8_t kds_s2000w_client_stop_scan(int64_t sessionid)
 
 uint8_t kds_s2000w_client_get_image(int64_t sessionid, uint8_t img_number, response_t* resp)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_get_image");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(sessionid);
        if (param == NULL)
@@ -491,7 +491,7 @@ uint8_t kds_s2000w_client_get_image(int64_t sessionid, uint8_t img_number, respo
 
 uint8_t kds_s2000w_client_delete_image(int64_t sessionid, uint8_t img_number)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_delete_image");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(sessionid);
        if (param == NULL)
@@ -519,7 +519,7 @@ uint8_t kds_s2000w_client_delete_image(int64_t sessionid, uint8_t img_number)
 
 uint8_t kds_s2000w_client_get_option(int64_t sessionid, response_t* resp)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_get_option");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(sessionid);
        if (param == NULL)
@@ -546,7 +546,7 @@ uint8_t kds_s2000w_client_get_option(int64_t sessionid, response_t* resp)
 
 uint8_t kds_s2000w_client_set_option(int64_t sessionid, response_t* resp)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_client_set_option");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        curl_param_t* param = _kds_s2000w_client_param_init(sessionid);
        if (param == NULL)
index 98e0d9df416fa58bda08c0815fce936e8c141429..a36398691b92f825b76f9472bd5402f9a3b3d016 100644 (file)
@@ -13,7 +13,7 @@
 
 uint32_t _kds_s2000w_handler_find_first_data_byte(const imagedata_t* image)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_find_first_data_byte");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        const char* data = (const char*) image->data;
        uint8_t header_spaces = 3;
@@ -51,7 +51,7 @@ client_config_t* _kds_s2000w_handler_convert_config(program_config_t* config)
 
 void _kds_s2000w_handler_load_config(handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_handler_load_config");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        char* config_stream = kds_s2000w_config_read(CONFIG_FILE);
        if (config_stream == NULL)
@@ -181,7 +181,7 @@ connection_state_t _kds_s2000w_handler_connect(handler_t* h)
 
 handler_t* kds_s2000w_handler_init()
 {
-       kds_s2000w_debug_printf(ALL, "init handler");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        handler_t* h = malloc(sizeof(handler_t));
        if (h == NULL)
@@ -229,7 +229,7 @@ handler_t* kds_s2000w_handler_init()
 
 void kds_s2000w_handler_free(handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "free handler");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (h == NULL)
                return;
@@ -251,7 +251,7 @@ void kds_s2000w_handler_free(handler_t* h)
 
 void kds_s2000w_handler_reset(handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "reset handler");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (h == NULL)
                return;
@@ -269,7 +269,7 @@ void kds_s2000w_handler_reset(handler_t* h)
 
 connection_state_t kds_s2000w_handler_open(void** handle)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_handler_open");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        handler_t* h = kds_s2000w_handler_init();
        if (h == NULL) {
@@ -285,7 +285,7 @@ connection_state_t kds_s2000w_handler_open(void** handle)
 
 void kds_s2000w_handler_close(handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_handler_close");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (h == NULL)
                return;
@@ -336,21 +336,21 @@ void kds_s2000w_handler_recreate_session(handler_t* h)
 
 void kds_s2000w_handler_start_scan(const handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_handler_start_scan");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        kds_s2000w_client_start_scan(h->sessionid);
 }
 
 void kds_s2000w_handler_stop_scan(const handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_handler_stop_scan");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        kds_s2000w_client_stop_scan(h->sessionid);
 }
 
 void kds_s2000w_handler_get_current_metadata(handler_t* h, metadata_t* params)
 {
-       kds_s2000w_debug_printf(ALL, "get_current_metadata");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        h->scan_status->read_bytes = 0;
 
@@ -392,7 +392,7 @@ void kds_s2000w_handler_get_current_metadata(handler_t* h, metadata_t* params)
 
 void kds_s2000w_handler_get_current_scan_status(handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "get_current_scan_status");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (h->scan_status->available_images > 1)
                return;
@@ -420,7 +420,7 @@ void kds_s2000w_handler_get_current_scan_status(handler_t* h)
 
 void kds_s2000w_handler_download_current_image(handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "download_current_image");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        free(h->image->data);
        h->image->data = NULL;
@@ -439,7 +439,7 @@ void kds_s2000w_handler_download_current_image(handler_t* h)
 
 void kds_s2000w_handler_delete_current_image(handler_t* h)
 {
-       kds_s2000w_debug_printf(ALL, "delete_current_image");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        kds_s2000w_client_delete_image(h->sessionid, h->scan_status->image_number);
        h->scan_status->available_images--;
index 23c4159edd008763921ffb44fbf7943a3ab27a25..1b16bbc7bda47a1ec9a3a6b985a8a43141bf70fe 100644 (file)
@@ -15,7 +15,7 @@ void _kds_s2000w_image_converter_to_pnm(blobdata_t* in,
        blobdata_t* out,
        const char* format)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_convert_to_pnm_With_depth");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        ExceptionInfo* exception = AcquireExceptionInfo();
        ImageInfo* image_info = CloneImageInfo(NULL);
@@ -56,7 +56,7 @@ void _kds_s2000w_image_converter_to_pnm(blobdata_t* in,
 
 image_metadata_t* kds_s2000w_image_converter_get_metadata(blobdata_t* image)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_metadata_from_image");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        image_metadata_t* mdata = malloc(sizeof(image_metadata_t));
        if (mdata == NULL)
@@ -89,7 +89,7 @@ image_metadata_t* kds_s2000w_image_converter_get_metadata(blobdata_t* image)
 
 void kds_s2000w_image_converter_to_pnm(blobdata_t* in, blobdata_t* out)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_pnm");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (kds_s2000w_image_type_check_is_jpeg(in)) {
                _kds_s2000w_image_converter_to_pnm(in, out, "jpg");
index 72039b48e60c0b6e26d17a64d8ab52ccd4153156..69fef90d33786134206fd7a3f2346954bc1a20c8 100644 (file)
@@ -84,7 +84,7 @@ toff_t _kds_s2000w_image_converter_tiff_size(thandle_t handler)
 
 uint32_t _kds_s2000w_image_converter_find_char(const blobdata_t* image, uint32_t start, const char cfind)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_find_char");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        const char* image_data = (const char*) image->data;
 
@@ -98,7 +98,7 @@ uint32_t _kds_s2000w_image_converter_find_char(const blobdata_t* image, uint32_t
 
 uint32_t _kds_s2000w_image_converter_get_number_from_substring(const char* data, uint32_t start, uint32_t end)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_get_number_from_substring");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        char* number_buffer = malloc(sizeof(char) * MAXBUFFER);
        if (number_buffer == NULL)
@@ -138,7 +138,7 @@ void _kds_s2000w_image_converter_tiff_metadata(blobdata_t* image, image_metadata
 
 void _kds_s2000w_image_converter_pnm_metadata(const blobdata_t* image, image_metadata_t* mdata)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_pnm_metadata");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        const char* image_data = (const char*) image->data;
 
@@ -156,7 +156,7 @@ void _kds_s2000w_image_converter_pnm_metadata(const blobdata_t* image, image_met
 
 void _kds_s2000w_image_converter_jpeg_metadata(blobdata_t* image, image_metadata_t* mdata)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_jpeg_metadata");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        struct jpeg_decompress_struct cinfo;
        struct jpeg_error_mgr err;
@@ -188,7 +188,7 @@ void _kds_s2000w_image_converter_write_bw_pnm(const uint8_t* data,
        uint32_t height,
        FILE* pnm_stream)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_write_bw_pnm");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        size_t bit_width = width * BYTE_BITS;
        bit** pixels = pbm_allocarray(bit_width, height);
@@ -221,7 +221,7 @@ void _kds_s2000w_image_converter_write_pnm(const uint8_t* data,
        enum imgformat format,
        FILE* pnm_stream)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_write_pnm");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        xel** pixels = pnm_allocarray(width, height);
        for (uint32_t i = 0; i < height; i++) {
@@ -259,7 +259,7 @@ void _kds_s2000w_image_converter_gray_or_color_jpg_to_pnm(j_decompress_ptr cinfo
        FILE* pnm_stream,
        enum imgformat format)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_jpg_to_pnm");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        size_t decompress_size = format * cinfo->output_width * cinfo->output_height;
        uint8_t* decompress_data = malloc(sizeof(uint8_t) * decompress_size);
@@ -283,7 +283,7 @@ void _kds_s2000w_image_converter_gray_or_color_jpg_to_pnm(j_decompress_ptr cinfo
 
 image_metadata_t* kds_s2000w_image_converter_get_metadata(blobdata_t* image)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_metadata_from_scanner_image");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (image->size < 2)
                return NULL;
@@ -314,7 +314,7 @@ image_metadata_t* kds_s2000w_image_converter_get_metadata(blobdata_t* image)
 
 void _kds_s2000w_image_converter_jpg_to_pnm(blobdata_t* in, blobdata_t* out)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_jpg_to_pnm");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (!kds_s2000w_image_type_check_is_jpeg(in))
                return;
@@ -351,7 +351,7 @@ void _kds_s2000w_image_converter_jpg_to_pnm(blobdata_t* in, blobdata_t* out)
 
 void _kds_s2000w_image_converter_tiff_to_pnm(blobdata_t* in, blobdata_t* out)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_tiff_to_pnm");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        tiff_reader_t* tiff_handler = malloc(sizeof(tiff_reader_t));
        if (tiff_handler == NULL)
@@ -421,7 +421,7 @@ void _kds_s2000w_image_converter_tiff_to_pnm(blobdata_t* in, blobdata_t* out)
 
 void kds_s2000w_image_converter_to_pnm(blobdata_t* in, blobdata_t* out)
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_image_converter_pnm");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (kds_s2000w_image_type_check_is_jpeg(in)) {
                _kds_s2000w_image_converter_jpg_to_pnm(in, out);
index 85f7bf951254e14fdf6f89029cce964a6fc6e2de..2d6016b472b6172f2a49b1682d347412ef249c49 100644 (file)
@@ -14,7 +14,7 @@ SANE_Device** kds_s2000w_device_info_ptr = NULL;
 
 SANE_Status sane_kds_s2000w_net_init(SANE_Int* version_code, SANE_Auth_Callback authorize)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_init");
+       kds_s2000w_debug_printf(ALL, __func__);
        kds_s2000w_debug_printf_version(INFO, NAME, MAJOR, MINOR, PATCH);
 
        *version_code = SANE_VERSION_CODE(MAJOR, MINOR, PATCH);
@@ -24,7 +24,7 @@ SANE_Status sane_kds_s2000w_net_init(SANE_Int* version_code, SANE_Auth_Callback
 
 void sane_kds_s2000w_net_exit(void)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_exit");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (kds_s2000w_device_info_ptr == NULL)
                return;
@@ -38,7 +38,7 @@ void sane_kds_s2000w_net_exit(void)
 SANE_Status sane_kds_s2000w_net_get_devices(SANE_Device*** device_list,
        SANE_Bool local_only)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_get_devices");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (kds_s2000w_device_info_ptr != NULL) {
                *device_list = kds_s2000w_device_info_ptr;
@@ -69,7 +69,7 @@ SANE_Status sane_kds_s2000w_net_get_devices(SANE_Device*** device_list,
 SANE_Status sane_kds_s2000w_net_open(SANE_String_Const devicename,
        SANE_Handle* handle)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_open");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (strcmp(devicename, NAME) != 0)
                return SANE_STATUS_INVAL;
@@ -106,7 +106,7 @@ SANE_Status sane_kds_s2000w_net_open(SANE_String_Const devicename,
 
 void sane_kds_s2000w_net_close(SANE_Handle handle)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_close");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        if (handle == NULL)
                return;
@@ -118,7 +118,7 @@ void sane_kds_s2000w_net_close(SANE_Handle handle)
 const SANE_Option_Descriptor* sane_kds_s2000w_net_get_option_descriptor(
        SANE_Handle handle, SANE_Int option)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_get_option_descriptor");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        return kds_s2000w_option_descriptors_get_by_number(option);
 }
@@ -126,7 +126,7 @@ const SANE_Option_Descriptor* sane_kds_s2000w_net_get_option_descriptor(
 SANE_Status sane_kds_s2000w_net_control_option(SANE_Handle handle,
        SANE_Int option, SANE_Action action, void* value, SANE_Int* info)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_control_option");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        handler_t* h = (handler_t*) handle;
        if (action == SANE_ACTION_GET_VALUE)
@@ -142,7 +142,7 @@ SANE_Status sane_kds_s2000w_net_control_option(SANE_Handle handle,
 SANE_Status sane_kds_s2000w_net_get_parameters(SANE_Handle handle,
        SANE_Parameters* params)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_get_parameters");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        handler_t* h = (handler_t*) handle;
 
@@ -154,7 +154,7 @@ SANE_Status sane_kds_s2000w_net_get_parameters(SANE_Handle handle,
 
 SANE_Status sane_kds_s2000w_net_start(SANE_Handle handle)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_start");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        handler_t* h = (handler_t*) handle;
 
@@ -189,7 +189,7 @@ SANE_Status sane_kds_s2000w_net_start(SANE_Handle handle)
 SANE_Status sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data,
        SANE_Int max_length, SANE_Int* length)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_read");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        handler_t* h = (handler_t*) handle;
 
@@ -214,7 +214,7 @@ SANE_Status sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data,
 
 void sane_kds_s2000w_net_cancel(SANE_Handle handle)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_cancel");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        handler_t* h = (handler_t*) handle;
 
@@ -246,7 +246,7 @@ void sane_kds_s2000w_net_cancel(SANE_Handle handle)
 SANE_Status sane_kds_s2000w_net_set_io_mode(SANE_Handle handle,
        SANE_Bool non_blocking)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_set_io_mode");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        return SANE_STATUS_UNSUPPORTED;
 }
@@ -254,7 +254,7 @@ SANE_Status sane_kds_s2000w_net_set_io_mode(SANE_Handle handle,
 // cppcheck-suppress constParameterPointer
 SANE_Status sane_kds_s2000w_net_get_select_fd(SANE_Handle handle, SANE_Int* fd)
 {
-       kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_get_select_fd");
+       kds_s2000w_debug_printf(ALL, __func__);
 
        return SANE_STATUS_UNSUPPORTED;
 }
\ No newline at end of file