]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
certtool-cfg.c: Silence -Wunused-variable if HAVE_IPV6 not set
authorTim Rühsen <tim.ruehsen@gmx.de>
Thu, 19 Dec 2019 11:23:34 +0000 (12:23 +0100)
committerTim Rühsen <tim.ruehsen@gmx.de>
Fri, 3 Jan 2020 10:34:37 +0000 (11:34 +0100)
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
src/certtool-cfg.c

index 75e1e57c54fe530ccd0cf932cd10d0ad87ff0e08..fbbb4c6ab96d6da7256d2850397711da56f153fa 100644 (file)
@@ -1880,10 +1880,11 @@ int get_tls_server_status(void)
 /* convert a printable IP to binary */
 static int string_to_ip(unsigned char *ip, const char *str)
 {
-       int len = strlen(str);
        int ret;
 
 #if HAVE_IPV6
+       int len = strlen(str);
+
        if (strchr(str, ':') != NULL || len > 16) {     /* IPv6 */
                ret = inet_pton(AF_INET6, str, ip);
                if (ret <= 0) {