From d6c07e7fa021e13b5b9914cb15f13c711ecd387d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 15 Jan 2017 17:15:47 +0100 Subject: Use macros to write the head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-from-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/blind-from-video.c') diff --git a/src/blind-from-video.c b/src/blind-from-video.c index 178ab17..f164195 100644 --- a/src/blind-from-video.c +++ b/src/blind-from-video.c @@ -258,7 +258,7 @@ main(int argc, char *argv[]) } if (skip_length) { - sprintf(head, "%zu %zu %zu %s\n%cuivf%zn", frames, width, height, "xyza", 0, &headlen); + SPRINTF_HEAD_ZN(head, frames, width, height, "xyza", &headlen); ewriteall(outfd, head, (size_t)headlen, outfile); } @@ -273,7 +273,7 @@ main(int argc, char *argv[]) frames = length / frame_size; if (!skip_length) { - sprintf(head, "%zu %zu %zu %s\n%cuivf%zn", frames, width, height, "xyza", 0, &headlen); + SPRINTF_HEAD_ZN(head, frames, width, height, "xyza", &headlen); ewriteall(outfd, head, (size_t)headlen, outfile); data = mmap(0, length + (size_t)headlen, PROT_READ | PROT_WRITE, MAP_SHARED, outfd, 0); memmove(data + headlen, data, length); -- cgit v1.2.3-70-g09d2