summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/ps3-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ncurses/ps3-main.c')
-rw-r--r--ui/ncurses/ps3-main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/ncurses/ps3-main.c b/ui/ncurses/ps3-main.c
index 890e47b..69913ed 100644
--- a/ui/ncurses/ps3-main.c
+++ b/ui/ncurses/ps3-main.c
@@ -597,7 +597,6 @@ int main(int argc, char *argv[])
int result;
int cui_result;
unsigned int mode;
- FILE *log;
result = opts_parse(&opts, argc, argv);
@@ -616,9 +615,13 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS;
}
- log = fopen(opts.log_file, "a");
- assert(log);
- pb_log_set_stream(log);
+ if (strcmp(opts.log_file, "-")) {
+ FILE *log = fopen(opts.log_file, "a");
+
+ assert(log);
+ pb_log_set_stream(log);
+ } else
+ pb_log_set_stream(stderr);
#if defined(DEBUG)
pb_log_always_flush(1);
OpenPOWER on IntegriCloud