]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
Revert "init response with null terminate"
authorBastian Dehn <hhaalo@arcor.de>
Thu, 21 Mar 2024 18:12:23 +0000 (19:12 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 21 Mar 2024 18:12:23 +0000 (19:12 +0100)
This reverts commit e4f1b268d3fefbd8cb8b67bdb9b58d4c8eb94a19.

src/kds_s2000w_client.c

index c035ef53a9537ec2a24b047f6f33e4b68ce2a09c..8a12d086c7585241c54a24bce72adf6276adeb3c 100644 (file)
@@ -42,8 +42,9 @@ response* kds_s2000w_client_response_init()
        debug_printf(ALL, "kds_s2000w_client_response_init");
 
        response* resp = NULL;
-       resp = malloc(sizeof(response) + sizeof(char));
-       resp->data = '\0';
+
+       resp = malloc(sizeof(response));
+       resp->data = malloc(sizeof(char));
        resp->size = 0;
        resp->code = 0L;