]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
move error method grouped
authorBastian Dehn <hhaalo@arcor.de>
Sat, 4 Jan 2025 08:50:08 +0000 (09:50 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 4 Jan 2025 08:50:08 +0000 (09:50 +0100)
src/kds_s2000w_client.c

index 0a4637238cc0dbbdf9b4a15282db7f5e522d3374..79a01699da98a9782375b256253015bf9c425e5f 100644 (file)
@@ -37,6 +37,14 @@ void _kds_s2000w_client_print_error_status(CURL* curl)
        fprintf(stderr, "%s\n", header->value);
 }
 
+void _kds_s2000w_client_print_error_result(CURLcode result)
+{
+       if (result == CURLE_OK)
+               return;
+
+       fprintf(stderr, "ERROR: curl_easy_perform: %s\n", curl_easy_strerror(result));
+}
+
 void _kds_s2000w_client_stream_to_response(char* mem, response* resp, size_t* size)
 {
        debug_printf(ALL, "kds_s2000w_client_stream_to_response");
@@ -46,14 +54,6 @@ void _kds_s2000w_client_stream_to_response(char* mem, response* resp, size_t* si
        memcpy(resp->data, mem, *size);
 }
 
-void _kds_s2000w_client_print_error_result(CURLcode result)
-{
-       if (result == CURLE_OK)
-               return;
-
-       fprintf(stderr, "ERROR: curl_easy_perform: %s\n", curl_easy_strerror(result));
-}
-
 void _kds_s2000w_client_set_ssl_verification_off(CURL* curl)
 {
        if (config->ssl_verify)