const char *i;
LTTNG_ASSERT(input);
- output = (char *) zmalloc(strlen(input) + 1);
+ output = calloc<char>(strlen(input) + 1);
if (!output) {
goto end;
}
for (at = 0, s = input; at < number_of_substrings; at++) {
const char *ss;
char *d;
- char *substring = (char *) zmalloc(longest_substring_len + 1);
+ char *substring = calloc<char>(longest_substring_len + 1);
if (!substring) {
goto error;
size_t oldlen = (old == NULL) ? 0 : strlen(old);
size_t appendlen = strlen(append);
- new_str = (char *) zmalloc(oldlen + appendlen + 1);
+ new_str = zmalloc<char>(oldlen + appendlen + 1);
if (!new_str) {
return -ENOMEM;
}
}
/* Allocate space for old string + new string + \0. */
- new_str = (char *) zmalloc(oldlen + ret + 1);
+ new_str = zmalloc<char>(oldlen + ret + 1);
if (!new_str) {
ret = -ENOMEM;
goto end;