]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: net - Change ip to ip_r in net_addr2ip()
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 21 Apr 2022 08:51:04 +0000 (11:51 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 25 Apr 2022 11:25:00 +0000 (11:25 +0000)
Coding style fix

src/lib/net.c
src/lib/net.h

index 93c7495975595c53e4788a1ab4c3faf8f97e2db4..f29a72f318e262b07ec284f960eb997a5d0aef78 100644 (file)
@@ -980,11 +980,11 @@ static bool net_addr2ip_inet4_fast(const char *addr, struct ip_addr *ip)
        return TRUE;
 }
 
-int net_addr2ip(const char *addr, struct ip_addr *ip)
+int net_addr2ip(const char *addr, struct ip_addr *ip_r)
 {
        int ret;
 
-       if (net_addr2ip_inet4_fast(addr, ip))
+       if (net_addr2ip_inet4_fast(addr, ip_r))
                return 0;
 
        T_BEGIN {
@@ -1005,7 +1005,7 @@ int net_addr2ip(const char *addr, struct ip_addr *ip)
                        i_assert(res != NULL);
                        const union sockaddr_union *so =
                                (union sockaddr_union *)res->ai_addr;
-                       sin_get_ip(so, ip);
+                       sin_get_ip(so, ip_r);
                }
                if (res != NULL)
                        freeaddrinfo(res);
index 497ca5fb83b3b4a3b91d6b076ebb70e8ee7e9bb1..3dc079e75aceb0a526e84492faf5c6d662bfee14 100644 (file)
@@ -156,7 +156,7 @@ int net_getunixcred(int fd, struct net_unix_cred *cred_r);
 /* Returns ip_addr as string, or "" if ip isn't valid IPv4 or IPv6 address. */
 const char *net_ip2addr(const struct ip_addr *ip);
 /* char* -> struct ip_addr translation. */
-int net_addr2ip(const char *addr, struct ip_addr *ip);
+int net_addr2ip(const char *addr, struct ip_addr *ip_r);
 /* char* -> in_port_t translation */
 int net_str2port(const char *str, in_port_t *port_r);
 /* char* -> in_port_t translation (allows port zero) */