Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/commandhelper.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tests/commandhelper.c b/tests/commandhelper.c
index f7e406ec83..ec54f55eb6 100644
--- a/tests/commandhelper.c
+++ b/tests/commandhelper.c
@@ -80,6 +80,15 @@ static struct Arguments *parseArguments(int argc, char** argv)
return NULL;
}
+static void printArguments(FILE *log, int argc, char** argv)
+{
+ size_t i;
+
+ for (i = 1; i < argc; i++) {
+ fprintf(log, "ARG:%s\n", argv[i]);
+ }
+}
+
static int envsort(const void *a, const void *b)
{
const char *astr = *(const char**)a;
@@ -115,9 +124,7 @@ int main(int argc, char **argv) {
if (!log || !args)
goto cleanup;
- for (i = 1; i < argc; i++) {
- fprintf(log, "ARG:%s\n", argv[i]);
- }
+ printArguments(log, argc, argv);
for (n = 0; environ[n]; n++) {
}
--
2.26.2