Skip to content

Commit

Permalink
fix clang analyzer warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hkiel authored and OpenModelica-Hudson committed Feb 2, 2016
1 parent dcc0ed6 commit 9aeedf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimulationRuntime/c/util/write_csv.c
Expand Up @@ -72,7 +72,7 @@ int omc_write_csv(OMC_WRITE_CSV* csvData, const void* csvLine){

dest_size = csv_write(&buffer, CSV_BUFFER_SIZE, csvLine, strlen(csvLine));
if (dest_size > CSV_BUFFER_SIZE){
unsigned char* newbuffer = (unsigned char*) malloc(dest_size*sizeof(char));
unsigned char* newbuffer = (unsigned char*) malloc(dest_size*sizeof(unsigned char));
dest_size = csv_write(&newbuffer, dest_size, csvLine, strlen(csvLine));
fprintf(csvData->handle, "%s", newbuffer);
}else{
Expand Down

0 comments on commit 9aeedf5

Please sign in to comment.