CLEANUP: tools: extra check in utoa_pad

Removing useless check in utoa_pad().

This was reported by Ilya with the help of cppcheck.
This commit is contained in:
Aurelien DARRAGON 2022-11-22 11:42:07 +01:00 committed by Christopher Faulet
parent ac1ca5cc7b
commit e3177af465

View File

@ -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';