]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Trivial fix for a trivial warning with gcc 9.1.1
authorNick Mathewson <nickm@torproject.org>
Tue, 28 May 2019 23:45:50 +0000 (19:45 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 28 May 2019 23:45:50 +0000 (19:45 -0400)
Fix on 4e3d144fb0940d8ee5a89427d471ea3656e8e122; bug not in any
released Tor.

src/lib/net/address.c

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