aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2019-02-21 12:45:25 -0800
committerTim Newsome <tim@sifive.com>2019-02-21 12:45:25 -0800
commit63257010626a243a088f59e26b02237615872cd6 (patch)
tree8cd331fd59a32d6b44abbb61f83a148ec653dce4
parent7072f925133db38501cb3bdf964f9f43a1fcf632 (diff)
downloadriscv-openocd-log_output.zip
riscv-openocd-log_output.tar.gz
riscv-openocd-log_output.tar.bz2
Follow OpenOCD style guide.log_output
Change-Id: I1105c9d570890423f2712919bdaba26fdd09acab
-rw-r--r--src/helper/log.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/helper/log.c b/src/helper/log.c
index e51943d..da3847d 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -222,13 +222,12 @@ COMMAND_HANDLER(handle_log_output_command)
{
if (CMD_ARGC == 1) {
FILE *file = NULL;
- if (!strcmp(CMD_ARGV[0], ">stdout")) {
+ if (!strcmp(CMD_ARGV[0], ">stdout"))
file = stdout;
- } else if (!strcmp(CMD_ARGV[0], ">stderr")) {
+ else if (!strcmp(CMD_ARGV[0], ">stderr"))
file = stderr;
- } else {
+ else
file = fopen(CMD_ARGV[0], "w");
- }
if (file == NULL) {
LOG_ERROR("failed to open output log '%s'", CMD_ARGV[0]);
return ERROR_FAIL;