aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/test_dbus.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_dbus.c b/test/test_dbus.c
index 4669c9c..2d2be6a 100644
--- a/test/test_dbus.c
+++ b/test/test_dbus.c
@@ -96,10 +96,11 @@ int main(int argc, char *argv[])
return -1;
}
- if (log == NULL || bin_log == NULL) {
- fprintf(stderr, "Log files not specified\n");
- return -1;
- }
+ if (!log)
+ log = fdopen(dup(fileno(stderr)), "w+");
+
+ if (!bin_log)
+ bin_log = fdopen(dup(fileno(stderr)), "w+");
// initialise the error value
dbus_error_init(&err);

Privacy Policy