summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorEric Wetzel <thewetzel@gmail.com>2011-01-05 21:54:12 -0500
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-01-09 21:35:23 +0100
commit0535531d2753f1b86454bb6ffad6ffbdd56c66d0 (patch)
tree1c93c3002ce7f2c2b6509daa6f4956713baee252 /src/helper
parent61e1e525c174eaf09debebcdc4ef50ce6f46a8c1 (diff)
downloadopenocd+libswd-0535531d2753f1b86454bb6ffad6ffbdd56c66d0.tar.gz
openocd+libswd-0535531d2753f1b86454bb6ffad6ffbdd56c66d0.tar.bz2
openocd+libswd-0535531d2753f1b86454bb6ffad6ffbdd56c66d0.tar.xz
openocd+libswd-0535531d2753f1b86454bb6ffad6ffbdd56c66d0.zip
nit: more LOG_* \n fixes
Remove extra \n from LOG_DEBUG, LOG_INFO, and LOG_WARNING messages Remove LOG_INFO_N LOG_INFO_N was only used once and had a \n at the end Change LOG_USER_N calls that end with \n to LOG_USER
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/command.c7
-rw-r--r--src/helper/log.h3
2 files changed, 3 insertions, 7 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index d5ac34b4..85d9463d 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -676,7 +676,7 @@ int command_run_line(struct command_context *context, char *line)
{
/* We do not print the connection closed error message */
Jim_MakeErrorMessage(interp);
- LOG_USER_N("%s\n", Jim_GetString(Jim_GetResult(interp), NULL));
+ LOG_USER("%s", Jim_GetString(Jim_GetResult(interp), NULL));
}
if (retval == ERROR_OK)
{
@@ -706,7 +706,7 @@ int command_run_line(struct command_context *context, char *line)
buff[chunk] = 0;
LOG_USER_N("%s", buff);
}
- LOG_USER_N("%s", "\n");
+ LOG_USER_N("\n");
}
retval = ERROR_OK;
}
@@ -860,8 +860,7 @@ static void command_help_show_wrap(const char *str, unsigned n, unsigned n2)
if (next - last < HELP_LINE_WIDTH(n))
cp = next;
command_help_show_indent(n);
- LOG_USER_N("%.*s", (int)(cp - last), last);
- LOG_USER_N("\n");
+ LOG_USER("%.*s", (int)(cp - last), last);
last = cp + 1;
n = n2;
}
diff --git a/src/helper/log.h b/src/helper/log.h
index 2852140b..801ae7f8 100644
--- a/src/helper/log.h
+++ b/src/helper/log.h
@@ -113,9 +113,6 @@ extern int debug_level;
#define LOG_INFO(expr ...) \
log_printf_lf (LOG_LVL_INFO, __FILE__, __LINE__, __FUNCTION__, expr)
-#define LOG_INFO_N(expr ...) \
- log_printf (LOG_LVL_INFO, __FILE__, __LINE__, __FUNCTION__, expr)
-
#define LOG_WARNING(expr ...) \
log_printf_lf (LOG_LVL_WARNING, __FILE__, __LINE__, __FUNCTION__, expr)