From bdb238b7059883d08ca30222479a1161bd0046a7 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 28 Apr 2012 15:36:39 -0400 Subject: [PATCH] param_argument cleanup --- main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 210d3d7..25be7ec 100644 --- a/main.c +++ b/main.c @@ -87,10 +87,11 @@ int main(int argc, char **argv) { return 0; } #define param_argument(argtype) do { \ - if (argv[1][2]) \ + if (argv[1][2]) { \ items_add((argitem){util_strdup(&argv[1][2]), argtype}); \ - else { \ - ++argv; --argc; \ + } else { \ + ++argv; \ + --argc; \ if (argc <= 1) \ goto clean_params_usage; \ items_add((argitem){util_strdup(&argv[1][0]), argtype}); \