Skip to content
Snippets Groups Projects
Commit cea614b5 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Fixed char -> unsigned char in s_mem_crea_str. Removed left-over

reference conuting.
parent 54981ae5
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ s_crea_str (String * dest_string, ...@@ -127,7 +127,7 @@ s_crea_str (String * dest_string,
EXPORT Success EXPORT Success
s_mem_crea_str (String * dest_string, s_mem_crea_str (String * dest_string,
const char * buffer, const unsigned char * buffer,
String_size length) String_size length)
{ {
void * temp_ptr; /* To hold result from malloc/realloc void * temp_ptr; /* To hold result from malloc/realloc
...@@ -139,9 +139,6 @@ s_mem_crea_str (String * dest_string, ...@@ -139,9 +139,6 @@ s_mem_crea_str (String * dest_string,
return FAILURE; return FAILURE;
} }
if ( dest_string->string == NULL )
++no_of_allocated_strings;
FREE_0 (dest_string->string); FREE_0 (dest_string->string);
dest_string->string = temp_ptr; dest_string->string = temp_ptr;
...@@ -174,9 +171,6 @@ s_size_crea_str(String *result, ...@@ -174,9 +171,6 @@ s_size_crea_str(String *result,
return FAILURE; return FAILURE;
} }
if ( result->string == NULL )
++no_of_allocated_strings;
FREE_0 (result->string); FREE_0 (result->string);
result->string = temp_ptr; result->string = temp_ptr;
result->len = length; result->len = length;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment