summaryrefslogtreecommitdiff
path: root/src/sockutil.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-17 20:17:52 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-17 20:17:52 +0000
commitad7b5bdd30405b92042c4a1872175be80d8d111f (patch)
tree8cdcd0509d935c1606f14a3f89f407897e2bc3d0 /src/sockutil.c
parentc4a8cc7e2f3890b8d82051c89748bea80350e8d4 (diff)
A few GCC 3.4.x and MSVC++ warning fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1839 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/sockutil.c')
-rw-r--r--src/sockutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sockutil.c b/src/sockutil.c
index 772b4aacc..683ffbef9 100644
--- a/src/sockutil.c
+++ b/src/sockutil.c
@@ -431,7 +431,7 @@ char *sgets(char *buf, int len, ano_socket_t s)
if (read_buffer_len() == 0 && c == 0)
return reinterpret_cast<char *>(-1);
c = sgetc(s);
- while (--len && (*ptr++ = c) != '\n' && (c = sgetc(s)) >= 0);
+ while (--len && (*ptr++ = static_cast<char>(c)) != '\n' && (c = sgetc(s)) >= 0);
if (c < 0)
return NULL;
*ptr = 0;
@@ -532,7 +532,7 @@ static char *pack_ip(const char *ipaddr)
for (i = 0; i < 4; i++) {
if (tmp[i] < 0 || tmp[i] > 255)
return NULL;
- ipbuf[i] = tmp[i];
+ ipbuf[i] = static_cast<char>(tmp[i]);
}
return ipbuf;
}