From e3177af465e6e44961efa23f58775db700d8911a Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Tue, 22 Nov 2022 11:42:07 +0100 Subject: [PATCH] CLEANUP: tools: extra check in utoa_pad Removing useless check in utoa_pad(). This was reported by Ilya with the help of cppcheck. --- src/tools.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools.c b/src/tools.c index b5b6442b3..cfa1cc6aa 100644 --- a/src/tools.c +++ b/src/tools.c @@ -421,8 +421,7 @@ char *utoa_pad(unsigned int n, char *dst, size_t size) } if (i + 2 > size) // (i + 1) + '\0' return NULL; // too long - if (i < size) - i = size - 2; // padding - '\0' + i = size - 2; // padding - '\0' ret = dst + i + 1; *ret = '\0';