Nmap Development mailing list archives

[PATCH] Remove useless code in setHostName() in Target.cc


From: Kris Katterjohn <kjak () ispwest com>
Date: Sat, 11 Mar 2006 10:21:58 -0600

The attached patch removes an if() statement along with a call to strchr()
because it doesn't affect anything.

Thanks,
Kris
--- Target.cc.orig      2005-10-01 18:50:38.000000000 -0500
+++ Target.cc   2006-03-11 09:54:43.000000000 -0600
@@ -277,8 +277,6 @@ void Target::setHostName(char *name) {
     hostname = NULL;
   }
   if (name) {
-    if (strchr(name, '%')) {
-    }
     p = hostname = strdup(name);
     while (*p) {
       // I think only a-z A-Z 0-9 . and - are allowed, but I'll be a little more



_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev

Current thread: