aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-21 21:10:25 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-21 21:10:25 +0000
commit46e3e8e089f5084933d562f2d0bb9b037e2e855c (patch)
treecfecab0dba9e3f5873815a62beba00ad46bf3813 /code
parent425e4a7cdb60ede267568dcb83a248c35491a89b (diff)
downloadioquake3-aero-46e3e8e089f5084933d562f2d0bb9b037e2e855c.tar.gz
ioquake3-aero-46e3e8e089f5084933d562f2d0bb9b037e2e855c.zip
Minor code cleanups
git-svn-id: svn://svn.icculus.org/quake3/trunk@1555 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/qcommon/net_ip.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c
index 8ac39a5..848e8c5 100644
--- a/code/qcommon/net_ip.c
+++ b/code/qcommon/net_ip.c
@@ -419,11 +419,10 @@ const char *NET_AdrToString (netadr_t a)
{
static char s[NET_ADDRSTRMAXLEN];
- if (a.type == NA_LOOPBACK) {
+ if (a.type == NA_LOOPBACK)
Com_sprintf (s, sizeof(s), "loopback");
- } else if (a.type == NA_BOT) {
+ else if (a.type == NA_BOT)
Com_sprintf (s, sizeof(s), "bot");
- }
else if (a.type == NA_IP || a.type == NA_IP6)
{
struct sockaddr_storage sadr;
@@ -440,18 +439,14 @@ const char *NET_AdrToStringwPort (netadr_t a)
{
static char s[NET_ADDRSTRMAXLEN];
- if (a.type == NA_LOOPBACK) {
+ if (a.type == NA_LOOPBACK)
Com_sprintf (s, sizeof(s), "loopback");
- } else if (a.type == NA_BOT) {
+ else if (a.type == NA_BOT)
Com_sprintf (s, sizeof(s), "bot");
- }
- else if (a.type == NA_IP || a.type == NA_IP6)
- {
- if(a.type == NA_IP)
- Com_sprintf(s, sizeof(s), "%s:%hu", NET_AdrToString(a), ntohs(a.port));
- else if(a.type == NA_IP6)
- Com_sprintf(s, sizeof(s), "[%s]:%hu", NET_AdrToString(a), ntohs(a.port));
- }
+ else if(a.type == NA_IP)
+ Com_sprintf(s, sizeof(s), "%s:%hu", NET_AdrToString(a), ntohs(a.port));
+ else if(a.type == NA_IP6)
+ Com_sprintf(s, sizeof(s), "[%s]:%hu", NET_AdrToString(a), ntohs(a.port));
return s;
}