Fix data type for return value of vasprintf()
Since size_t is an unsigned data type, it won't evaluate correctly on errors of vasprintf(). This patch makes 'len2' a signed integer, as expected by vasprintf(). 'len2' is of type 'size_t' in util.c:451, but vasprintf in line 457 returns '-1' on error which is checked in line 460. Currently this check will always fail (regardless of the return value of vasprintf()), according to its declaration as unsigned int. [ RC: Added more explanation taken from another list message. ] Signed-off-by: Henry Jesuiter <henry.jesuiter@alcnetworx.de>master
parent
3938cbc101
commit
dc09312ce7
Loading…
Reference in New Issue