summaryrefslogtreecommitdiff
path: root/src/irc/dcc/dcc.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-09-14 00:42:37 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-09-14 00:42:37 +0000
commitc5095a422cd13e39fdcc718079f1f91d53f4cf92 (patch)
tree269144383ab631812ed850fc439abbda8733d698 /src/irc/dcc/dcc.c
parent9805841e6194f07d5a353735dfb561eba702e37d (diff)
downloadirssi-c5095a422cd13e39fdcc718079f1f91d53f4cf92.zip
s/guint32/in_addr_t/ actually.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2917 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/dcc/dcc.c')
-rw-r--r--src/irc/dcc/dcc.c8
1 files changed, 4 insertions, 4 deletions
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);