summaryrefslogtreecommitdiff
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r--channels/chan_oss.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index bcf6dd8ad..0e3b02b69 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -1394,9 +1394,7 @@ static struct chan_oss_pvt *store_config(struct ast_config *cfg, char *ctg)
if (o->mixer_cmd) {
char *cmd;
- if (asprintf(&cmd, "mixer %s", o->mixer_cmd) < 0) {
- ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
- } else {
+ if (ast_asprintf(&cmd, "mixer %s", o->mixer_cmd) >= 0) {
ast_log(LOG_WARNING, "running [%s]\n", cmd);
if (system(cmd) < 0) {
ast_log(LOG_WARNING, "system() failed: %s\n", strerror(errno));