From c5095a422cd13e39fdcc718079f1f91d53f4cf92 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 14 Sep 2002 00:42:37 +0000 Subject: s/guint32/in_addr_t/ actually. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2917 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/dcc/dcc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/irc/dcc/dcc.c') diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c index 1b33d95f..68fb9acb 100644 --- a/src/irc/dcc/dcc.c +++ b/src/irc/dcc/dcc.c @@ -158,7 +158,7 @@ DCC_REC *dcc_find_request(int type, const char *nick, const char *arg) void dcc_ip2str(IPADDR *ip, char *host) { IPADDR temp_ip; - guint32 addr; + in_addr_t addr; if (*settings_get_str("dcc_own_ip") != '\0') { /* overridden IP address */ @@ -170,7 +170,7 @@ void dcc_ip2str(IPADDR *ip, char *host) /* IPv6 */ net_ip2host(ip, host); } else { - memcpy(&addr, &ip->ip, 4); + memcpy(&addr, &ip->ip, sizeof(addr)); g_snprintf(host, MAX_IP_LEN, "%lu", (unsigned long) htonl(addr)); } @@ -178,14 +178,14 @@ void dcc_ip2str(IPADDR *ip, char *host) void dcc_str2ip(const char *str, IPADDR *ip) { - guint32 addr; + in_addr_t addr; if (strchr(str, ':') == NULL) { /* normal IPv4 address in 32bit number form */ addr = strtoul(str, NULL, 10); ip->family = AF_INET; addr = (guint32) ntohl(addr); - memcpy(&ip->ip, &addr, 4); + memcpy(&ip->ip, &addr, sizeof(addr)); } else { /* IPv6 - in standard form */ net_host2ip(str, ip); -- cgit v1.2.3