diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-03 13:01:18 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-03 13:01:18 +0000 |
commit | 18a994a6bd010c8cc2aaf4ab71cac668456478f3 (patch) | |
tree | abb46c31afc6ebcdf0fe23efebceddacd74b349a /channels/chan_oss.c | |
parent | 45e15356337a46b7d541bbf4c86bdd2f2d329aa8 (diff) |
somehow missed a bunch of gcc 4.3.x warnings in this branch on the first pass
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@153823 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r-- | channels/chan_oss.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 1a6cfd0b6..a4f373ad9 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -1792,12 +1792,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); - if (system(cmd) < 0) { - ast_log(LOG_WARNING, "system() failed: %s\n", strerror(errno)); + 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)); + } + free(cmd); } - free(cmd); } if (o == &oss_default) /* we are done with the default */ return NULL; |