Mercurial > mplayer.hg
changeset 24920:12dc34b2e41c
Simplify argument "parsing"
author | reimar |
---|---|
date | Sat, 03 Nov 2007 10:37:22 +0000 |
parents | 51372a34bc7d |
children | 148ca265fcb6 |
files | libao2/ao_pulse.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_pulse.c Sat Nov 03 10:35:03 2007 +0000 +++ b/libao2/ao_pulse.c Sat Nov 03 10:37:22 2007 +0000 @@ -126,11 +126,9 @@ 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;