diff options
author | Max Kellermann <max@duempel.org> | 2008-09-12 16:41:22 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-12 16:41:22 +0200 |
commit | 42f617719995382bb417a18c33db4b8d3128113c (patch) | |
tree | 5ec24b3caf5f40951f5b999ee2c982f75cbd0fef /src/audioOutputs | |
parent | 265b8fffb270325f62a15a842fe4498c87a08204 (diff) | |
download | mpd-42f617719995382bb417a18c33db4b8d3128113c.tar.gz mpd-42f617719995382bb417a18c33db4b8d3128113c.tar.xz mpd-42f617719995382bb417a18c33db4b8d3128113c.zip |
shout: removed clear_shout_buffer()
The function is trivial, without a benefit. Also don't initialize
buf.data[0], this is not a null terminated string.
Diffstat (limited to 'src/audioOutputs')
-rw-r--r-- | src/audioOutputs/audioOutput_shout.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c index f702acb00..8f0bf45aa 100644 --- a/src/audioOutputs/audioOutput_shout.c +++ b/src/audioOutputs/audioOutput_shout.c @@ -45,12 +45,6 @@ shout_encoder_plugin_get(const char *name) return NULL; } -static void clear_shout_buffer(struct shout_data * sd) -{ - sd->buf.len = 0; - sd->buf.data[0] = '\0'; -} - static struct shout_data *new_shout_data(void) { struct shout_data *ret = xmalloc(sizeof(*ret)); @@ -66,7 +60,7 @@ static struct shout_data *new_shout_data(void) ret->conn_attempts = 0; ret->last_attempt = 0; ret->timer = NULL; - clear_shout_buffer(ret); + ret->buf.len = 0; return ret; } @@ -304,7 +298,7 @@ static int write_page(struct shout_data *sd) err = shout_send(sd->shout_conn, sd->buf.data, sd->buf.len); if (handle_shout_error(sd, err) < 0) return -1; - clear_shout_buffer(sd); + sd->buf.len = 0; return 0; } |