From b7a82c980fe7e0c1f9029b55be97422428d65d5a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 11 Jan 2017 09:11:51 +0100 Subject: Clean up code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/vu-write-head.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/vu-write-head.c') diff --git a/src/vu-write-head.c b/src/vu-write-head.c index 55170c0..9e7c4a3 100644 --- a/src/vu-write-head.c +++ b/src/vu-write-head.c @@ -1,29 +1,16 @@ /* See LICENSE file for copyright and license details. */ -#include "arg.h" #include "util.h" -static void -usage(void) -{ - eprintf("usage: %s parameters ...\n", argv0); -} +USAGE("parameters ...") int main(int argc, char *argv[]) { - int i; - - ARGBEGIN { - default: - usage(); - } ARGEND; - - if (!argc) - usage(); + ENOFLAGS(!argc); - printf("%s", argv[0]); - for (i = 0; i < argc; i++) - printf(" %s", argv[i]); + printf("%s", *argv++); + while (*argv) + printf(" %s", *argv++); printf("\n%cuivf", 0); efshut(stdout, ""); -- cgit v1.2.3-70-g09d2