From 150d91d07f50b63ce314c1816ca2359ddb2300d0 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 5 Sep 2012 07:03:37 -0500 Subject: [PATCH] main: add a trailing space at the end of the output if --cflags or --libs is requested (closes #40) --- main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index d807bf3..0947d8a 100644 --- a/main.c +++ b/main.c @@ -883,7 +883,7 @@ main(int argc, char *argv[]) if (!pkg_queue_apply(pkgq_head, apply_cflags, maximum_traverse_depth, global_traverse_flags, &frag_list)) { ret = EXIT_FAILURE; - goto out; + goto out_println; } } @@ -894,15 +894,16 @@ main(int argc, char *argv[]) if (!pkg_queue_apply(pkgq_head, apply_libs, maximum_traverse_depth, global_traverse_flags, &frag_list)) { ret = EXIT_FAILURE; - goto out; + goto out_println; } } - if (want_flags & (PKG_CFLAGS|PKG_LIBS)) - printf("\n"); - pkg_queue_free(pkgq_head); +out_println: + if (want_flags & (PKG_CFLAGS|PKG_LIBS)) + printf(" \n"); + out: pkg_tuple_free_global(); return ret;