From: Aurelien DARRAGON Date: Tue, 22 Nov 2022 10:42:07 +0000 (+0100) Subject: CLEANUP: tools: extra check in utoa_pad X-Git-Tag: v2.7-dev10~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3177af465e6e44961efa23f58775db700d8911a;p=thirdparty%2Fhaproxy.git CLEANUP: tools: extra check in utoa_pad Removing useless check in utoa_pad(). This was reported by Ilya with the help of cppcheck. --- diff --git a/src/tools.c b/src/tools.c index b5b6442b3e..cfa1cc6aab 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';