Trivial fix for a trivial warning with gcc 9.1.1

Fix on 4e3d144fb0940d8ee5a89427d471ea3656e8e122; bug not in any
released Tor.
This commit is contained in:
Nick Mathewson 2019-05-28 19:45:50 -04:00
parent ff9aa32143
commit 24a2352d56

View File

@ -339,7 +339,7 @@ tor_addr_to_str(char *dest, const tor_addr_t *addr, size_t len, int decorate)
break; break;
case AF_INET6: case AF_INET6:
/* Shortest addr [ :: ] + \0 */ /* Shortest addr [ :: ] + \0 */
if (len < (3 + (decorate ? 2 : 0))) if (len < (3u + (decorate ? 2 : 0)))
return NULL; return NULL;
if (decorate) if (decorate)