diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-06-14 23:01:01 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-06-14 23:01:01 +0000 |
commit | b179e2155f886117b68499c5c918c82242728a86 (patch) | |
tree | ca14014e3c226332296ae0d687f996e9d8dfe6b2 /res/res_monitor.c | |
parent | 5dd9887ac7c638e8460f85ec2a93f5b490f15d6d (diff) |
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
Diffstat (limited to 'res/res_monitor.c')
-rw-r--r-- | res/res_monitor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index d23c6f727..a01d953a3 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -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); |