]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afh.c
fd: Let write_all() return an error on short writes.
[paraslash.git] / afh.c
diff --git a/afh.c b/afh.c
index 4b4cc781144c5e0f68ac34ac8b98d3c5ad3f5912..8810a28b8dacc83731c40a57f014b2190a3b81ab 100644 (file)
--- a/afh.c
+++ b/afh.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2008-2012 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -152,7 +152,7 @@ static int cat_file(struct afh_info *afhi, int audio_format_id,
                if (!size)
                        continue;
                PARA_INFO_LOG("writing chunk %lu\n", i);
-               ret = write_all(STDOUT_FILENO, buf, &size);
+               ret = write_all(STDOUT_FILENO, buf, size);
                if (ret < 0)
                        return ret;
        }