diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-12-14 14:13:54 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-12-14 14:13:54 +0000 |
commit | b0f2b7bae42a94f9bd0250e7050fabbeb3fb5d25 (patch) | |
tree | 810cc7fe6b88ccf67b05e3afc1038ef5284751c0 | |
parent | 4d2920f3901c40b0b8abaace822f6e4a6537fb81 (diff) |
Remove unecessary variable and strlen call
-rw-r--r-- | audio/headset.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/audio/headset.c b/audio/headset.c index 42e385cd..446c1eb5 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -137,13 +137,12 @@ static int headset_send(struct headset *hs, char *format, ...) char rsp[BUF_SIZE]; va_list ap; gsize total_written, written, count; - int err; va_start(ap, format); - err = vsnprintf(rsp, sizeof(rsp), format, ap); + count = vsnprintf(rsp, sizeof(rsp), format, ap); va_end(ap); - if (err < 0) + if (count < 0) return -EINVAL; if (hs->state < HEADSET_STATE_CONNECTED || !hs->rfcomm) { @@ -151,7 +150,6 @@ static int headset_send(struct headset *hs, char *format, ...) return -EIO; } - count = strlen(rsp); written = total_written = 0; while (total_written < count) { |