[quake3-commits] r1555 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu May 21 17:10:25 EDT 2009
Author: thilo
Date: 2009-05-21 17:10:25 -0400 (Thu, 21 May 2009)
New Revision: 1555
Modified:
trunk/code/qcommon/net_ip.c
Log:
Minor code cleanups
Modified: trunk/code/qcommon/net_ip.c
===================================================================
--- trunk/code/qcommon/net_ip.c 2009-05-21 20:52:35 UTC (rev 1554)
+++ trunk/code/qcommon/net_ip.c 2009-05-21 21:10:25 UTC (rev 1555)
@@ -419,11 +419,10 @@
{
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 @@
{
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;
}
More information about the quake3-commits
mailing list