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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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);