Skip to content

Commit

Permalink
Fixed compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
steffennissen committed Aug 16, 2014
1 parent 4489af1 commit 123de6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fann_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ void fann_error(struct fann_error *errdat, const enum fann_errno_enum errno_f, .
{
if(errdat->errstr == NULL)
{
errdat->errstr = malloc(strlen(errstr) + 1);
errdat->errstr = (char*)malloc(strlen(errstr) + 1);
}
else if(strlen(errdat->errstr) < strlen(errstr))
{
errdat->errstr = realloc(errdat->errstr, strlen(errstr) + 1);
errdat->errstr = (char*)realloc(errdat->errstr, strlen(errstr) + 1);
}
/* allocation failed */
if(errdat->errstr == NULL)
Expand Down

0 comments on commit 123de6b

Please sign in to comment.