summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net.c')
-rw-r--r--net.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net.c b/net.c
index bcefad4..bf20b9e 100644
--- a/net.c
+++ b/net.c
@@ -192,6 +192,8 @@ rsRetVal gethname(struct sockaddr_storage *f, uchar *pszHostFQDN)
finalize_it:
return iRet;
}
+
+
/* Return a printable representation of a host address.
* Now (2007-07-16) also returns the full host name (if it could be obtained)
* in the second param [thanks to mildew@gmail.com for the patch].
@@ -242,7 +244,6 @@ rsRetVal cvthname(struct sockaddr_storage *f, uchar *pszHost, uchar *pszHostFQDN
if ((p = (uchar*) strchr((char*)pszHost, '.'))) { /* find start of domain name "machine.example.com" */
if(strcmp((char*) (p + 1), LocalDomain) == 0) {
*p = '\0'; /* simply terminate the string */
- return 1;
} else {
/* now check if we belong to any of the domain names that were specified
* in the -s command line option. If so, remove and we are done.
@@ -252,7 +253,7 @@ rsRetVal cvthname(struct sockaddr_storage *f, uchar *pszHost, uchar *pszHostFQDN
while (StripDomains[count]) {
if (strcmp((char*)(p + 1), StripDomains[count]) == 0) {
*p = '\0';
- return 1;
+ FINALIZE; /* we are done */
}
count++;
}
@@ -270,7 +271,7 @@ rsRetVal cvthname(struct sockaddr_storage *f, uchar *pszHost, uchar *pszHostFQDN
while (LocalHosts[count]) {
if (!strcmp((char*)pszHost, LocalHosts[count])) {
*p = '\0';
- return 1;
+ break; /* we are done */
}
count++;
}