diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 23:01:01 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 23:01:01 +0000 |
commit | 7a0fe5c93f93c827215ac7ed613130434c77e649 (patch) | |
tree | ca14014e3c226332296ae0d687f996e9d8dfe6b2 /res | |
parent | e95289a0e951770a0233260e49add9df9b20d97a (diff) |
Convert uses of strdup() to ast_strdup()
(issue #9983, eliel)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69436 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_features.c | 4 | ||||
-rw-r--r-- | res/res_indications.c | 4 | ||||
-rw-r--r-- | res/res_monitor.c | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/res/res_features.c b/res/res_features.c index bd8504f05..7575b2797 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -469,7 +469,7 @@ int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeou if (!con) /* Still no context? Bad */ ast_log(LOG_ERROR, "Parking context '%s' does not exist and unable to create\n", parking_con); else { /* Add extension to context */ - if (!ast_add_extension2(con, 1, pu->parkingexten, 1, NULL, NULL, parkedcall, strdup(pu->parkingexten), ast_free, registrar)) + if (!ast_add_extension2(con, 1, pu->parkingexten, 1, NULL, NULL, parkedcall, ast_strdup(pu->parkingexten), ast_free, registrar)) notify_metermaids(pu->parkingexten, parking_con); } /* Tell the peer channel the number of the parking space */ @@ -1937,7 +1937,7 @@ static void *do_parking_thread(void *ignore) if (con) { char returnexten[AST_MAX_EXTENSION]; snprintf(returnexten, sizeof(returnexten), "%s||t", peername); - ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", strdup(returnexten), ast_free, registrar); + ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", ast_strdup(returnexten), ast_free, registrar); } if (comebacktoorigin) { set_c_e_p(chan, parking_con_dial, peername, 1); diff --git a/res/res_indications.c b/res/res_indications.c index 1a8aafc76..7397218dc 100644 --- a/res/res_indications.c +++ b/res/res_indications.c @@ -314,8 +314,8 @@ static int ind_load_module(void) return -1; } ts->next = NULL; - ts->name = strdup(v->name); - ts->data = strdup(v->value); + ts->name = ast_strdup(v->name); + ts->data = ast_strdup(v->value); if (ps) ps->next = ts; else 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); |