Convert uses of strdup() to ast_strdup()

(issue #9983, eliel)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-06-14 23:01:01 +00:00
parent 5dd9887ac7
commit b179e2155f
19 changed files with 62 additions and 62 deletions

View File

@@ -154,7 +154,7 @@ int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
int directory = strchr(fname_base, '/') ? 1 : 0;
/* try creating the directory just in case it doesn't exist */
if (directory) {
char *name = strdup(fname_base);
char *name = ast_strdup(fname_base);
snprintf(tmp, sizeof(tmp), "mkdir -p \"%s\"",dirname(name));
ast_free(name);
ast_safe_system(tmp);
@@ -186,9 +186,9 @@ int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
/* Determine file format */
if (!ast_strlen_zero(format_spec)) {
monitor->format = strdup(format_spec);
monitor->format = ast_strdup(format_spec);
} else {
monitor->format = strdup("wav");
monitor->format = ast_strdup("wav");
}
/* open files */
@@ -366,7 +366,7 @@ int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base, i
int directory = strchr(fname_base, '/') ? 1 : 0;
/* try creating the directory just in case it doesn't exist */
if (directory) {
char *name = strdup(fname_base);
char *name = ast_strdup(fname_base);
snprintf(tmp, sizeof(tmp), "mkdir -p %s",dirname(name));
ast_free(name);
ast_safe_system(tmp);