Commit 0654eb45e5a638e73487cae3bf30ea92d49629fd
Fix inaccurate usage of realloc
Found by clang-checker.
Author: xaizek
Author date (UTC): 2012-10-18 17:28
Committer name: xaizek
Committer date (UTC): 2012-10-18 17:28
Parent(s): 87487f1bd5f6727c3b4e2de944a8b451c143c969
Signing key:
Tree: d05201c37d4b5aac2a50d9561572fb297aa83215
File src/engine/options.c changed (mode: 100644) (index 19358a70b..e83c24292) |
... |
... |
str_add(char *old, const char *value) |
693 |
693 |
if(old == NULL) |
if(old == NULL) |
694 |
694 |
strcpy(new, ""); |
strcpy(new, ""); |
695 |
695 |
else |
else |
696 |
|
strcat(strcpy(new, old), ","); |
|
|
696 |
|
strcat(new, ","); |
697 |
697 |
strcat(new, value); |
strcat(new, value); |
698 |
698 |
return new; |
return new; |
699 |
699 |
} |
} |