]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audioc.c
Merge branch 't/utf8'
[paraslash.git] / audioc.c
index 09b21ba95c73b976e753eac5da06ff5208ca16da..abd763596e8b0039084d502e428d1ddec00ea232 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -128,9 +128,7 @@ static void audioc_post_select(struct sched *s, struct task *t)
 out:
        if (ret < 0) {
                free(buf);
-               btr_remove_node(at->btrn);
-               btr_free_node(at->btrn);
-               at->btrn = NULL;
+               btr_remove_node(&at->btrn);
                close(at->fd);
        }
        t->error = ret;
@@ -341,7 +339,7 @@ int main(int argc, char *argv[])
                size_t n = ret = recv_bin_buffer(fd, buf, bufsize);
                if (ret <= 0)
                        break;
-               ret = write_all(STDOUT_FILENO, buf, &n);
+               ret = write_all(STDOUT_FILENO, buf, n);
        } while (ret >= 0);
 out:
        free(buf);