]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change null term with zero
authorBastian Dehn <hhaalo@arcor.de>
Fri, 14 Feb 2025 10:59:11 +0000 (11:59 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 14 Feb 2025 10:59:11 +0000 (11:59 +0100)
src/kds_s2000w_client.c
src/kds_s2000w_config.c

index 7f951b73a733d52ed48e8386b15b68fb998af04f..934d4d6ce31d47758f58c9896ad8a51e1c58c53f 100644 (file)
@@ -43,7 +43,7 @@ void _kds_s2000w_client_add_null_terminate_to_response(response* resp)
        resp->size++;
        resp->data = realloc(resp->data, resp->size);
        char* responsedata = (char*) resp->data;
-       responsedata[resp->size - 1] = '\0';
+       responsedata[resp->size - 1] = 0;
 }
 
 void _kds_s2000w_client_print_error_status(CURL* curl)
index e7931075de52fc2c25ac579f494a478d11b55313..a16e311c6d27b24b036af0ec3ec93c7d049769f0 100644 (file)
@@ -28,7 +28,7 @@ char* kds_s2000w_config_read(const char* filename)
 
        char* config_string = malloc(sizeof(char) * config_size + 1);
        fread(config_string, config_size, 1, config_file);
-       config_string[config_size] = '\0';
+       config_string[config_size] = 0;
 
        fclose(config_file);
        config_file = NULL;
@@ -41,8 +41,8 @@ program_config* kds_s2000w_config_load(char* config_string)
        program_config* config = malloc(sizeof(program_config));
        config->scanner_url = malloc(sizeof(char));
        config->username = malloc(sizeof(char));
-       *config->scanner_url = '\0';
-       *config->username = '\0';
+       *config->scanner_url = 0;
+       *config->username = 0;
        config->heartbeat = 1;
        config->ssl_verify = 0;