From ee07b1e97986cfaf1ee0753230191c44fea9f470 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 15 Aug 2017 17:36:19 -0400 Subject: [PATCH] Fix: attempt to fix improper use of negative value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Found by Coverity, unsure that the fix will make it happy: CID 1376189 (#1 of 1): Improper use of negative value (NEGATIVE_RETURNS)negative_returns: Passing negative constant -1 to a parameter that cannot be negative. [hide details] Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- logging/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging/log.c b/logging/log.c index 49a3061a..1a9fed4b 100644 --- a/logging/log.c +++ b/logging/log.c @@ -905,7 +905,7 @@ static char *put_integer_r(unsigned v, const int sign, const unsigned w, const char wc, char *const e) { static const char _signs[] = {'-', '0', '+'}; - static const char *const signs = _signs + 1; + const char *const signs = _signs + 1; char *p = e; do { *--p = '0' + v % 10; } while (0 != (v /= 10)); if (0 == sign) return put_padding_r(w, wc, p, e); -- 2.34.1