From 48a681c741993e61f2a9404b75b73d011b9e184e Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 11 Sep 2014 22:14:58 +0100 Subject: [PATCH] helper: constify log_strings Change-Id: I5bdd8958e79b754d56bb7aee2892856e557eed76 Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/2296 Tested-by: jenkins --- src/helper/binarybuffer.c | 2 +- src/helper/log.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helper/binarybuffer.c b/src/helper/binarybuffer.c index a3c993d3..3cadabdb 100644 --- a/src/helper/binarybuffer.c +++ b/src/helper/binarybuffer.c @@ -231,7 +231,7 @@ char *buf_to_str(const void *_buf, unsigned buf_len, unsigned radix) } } - const char *DIGITS = "0123456789ABCDEF"; + const char * const DIGITS = "0123456789ABCDEF"; for (unsigned j = 0; j < str_len; j++) str[j] = DIGITS[(int)str[j]]; diff --git a/src/helper/log.c b/src/helper/log.c index cb1fbac7..c15b95da 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -52,7 +52,7 @@ static long long current_time; static long long start; -static char *log_strings[5] = { +static const char * const log_strings[5] = { "User : ", "Error: ", "Warn : ", /* want a space after each colon, all same width, colons aligned */ -- 2.39.5