diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-03 00:39:04 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-03 00:39:04 +0000 |
commit | d3d057390c26ce35b54750705377c4d3ff4e42bd (patch) | |
tree | a04b5ab1a5d778cb8c4239d8cac88ef1a5ebba5d /channels/chan_oss.c | |
parent | 9a2130e9dec6e913af3b75006c23feb0520d6814 (diff) |
port gcc 4.3.x warning fixes from trunk to this branch
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@153743 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r-- | channels/chan_oss.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 796a8f4a0..f42170539 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -1375,10 +1375,15 @@ static struct chan_oss_pvt *store_config(struct ast_config *cfg, char *ctg) if (o->mixer_cmd) { char *cmd; - asprintf(&cmd, "mixer %s", o->mixer_cmd); - ast_log(LOG_WARNING, "running [%s]\n", cmd); - system(cmd); - ast_free(cmd); + if (asprintf(&cmd, "mixer %s", o->mixer_cmd) < 0) { + ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno)); + } else { + ast_log(LOG_WARNING, "running [%s]\n", cmd); + if (system(cmd) < 0) { + ast_log(LOG_WARNING, "system() failed: %s\n", strerror(errno)); + } + ast_free(cmd); + } } if (o == &oss_default) /* we are done with the default */ return NULL; |