diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-03 10:37:22 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-03 10:37:22 +0000 |
commit | f4f7560a1ed8d6315eb33ee2fc1be0cc3eac6dcb (patch) | |
tree | 897ea6cc10371b5634bb2d425d522df1727e4148 | |
parent | a44c9616a8ef9302d80ec72d1287dfe38a12b694 (diff) |
Simplify argument "parsing"
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24948 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_pulse.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libao2/ao_pulse.c b/libao2/ao_pulse.c index 6f62d1df6c..4e9030c802 100644 --- a/libao2/ao_pulse.c +++ b/libao2/ao_pulse.c @@ -126,11 +126,9 @@ static int init(int rate_hz, int channels, int format, int flags) { char *sink = NULL; if (ao_subdevice) { - int i = strcspn(ao_subdevice, ":"); host = strdup(ao_subdevice); - if (host[i] == ':') - sink = &host[i + 1]; - host[i] = 0; + sink = strchr(host, ':'); + if (sink) *sink++ = 0; } ss.channels = channels; |