} while (*token != '\0');
/* Add two here for the NULL terminating element and trace path */
- argv = (char **) zmalloc(sizeof(char *) * (num_opts + 2));
+ argv = calloc<char *>(num_opts + 2);
if (argv == NULL) {
goto error;
}
const char *trace_path, bool opt_live_mode)
{
char **argv;
- size_t size, mem_len;
+ size_t mem_len;
/* Add one for the NULL terminating element. */
mem_len = opts_len + 1;
mem_len += 1;
}
- size = sizeof(char *) * mem_len;
-
- /* Add two here for the trace_path and the NULL terminating element. */
- argv = (char **) zmalloc(size);
+ argv = calloc<char *>(mem_len);
if (argv == NULL) {
goto error;
}