From 5ac6b5f44f64ff9a2f0e01a65013da829edfab9e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 11 Dec 2011 20:21:53 +0100 Subject: [PATCH] afh: Use write_all rather than plain write(). We are currently using plain write() to write out the audio file header. If this results in a short write, or if the write is interrupted, we should just try again. So it's safer to call write_all() here. --- afh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/afh.c b/afh.c index 8810a28b..b76c72fd 100644 --- a/afh.c +++ b/afh.c @@ -124,7 +124,7 @@ static int cat_file(struct afh_info *afhi, int audio_format_id, &header, &size); if (size > 0) { PARA_INFO_LOG("writing header (%zu bytes)\n", size); - ret = write(STDOUT_FILENO, header, size); /* FIXME */ + ret = write_all(STDOUT_FILENO, header, size); afh_free_header(header, audio_format_id); if (ret < 0) return ret; -- 2.39.5