Home page logo
/

nmap-dev logo Nmap Development mailing list archives

[PATCH] Remove unused variable in nmap.cc
From: Kris Katterjohn <kjak () ispwest com>
Date: Mon, 06 Mar 2006 08:52:16 -0600

The attached patch removes the unused variable 'emptystring'. It's declared at
the top but assigned to later on so that's probably why gcc didn't pick it up
as unused.

Just curious, what was it used for?

Thanks,
Kris Katterjohn
--- nmap.cc.orig        2006-03-06 08:42:55.000000000 -0600
+++ nmap.cc     2006-03-06 08:43:01.000000000 -0600
@@ -229,7 +229,6 @@ int nmap_main(int argc, char *argv[]) {
   vector<Target *> Targets;
   char *portlist = NULL; /* Ports list specified by user */
   char *proberr;
-  char emptystring[1];
   int sourceaddrwarning = 0; /* Have we warned them yet about unguessable
                                source addresses? */
   unsigned int ideal_scan_group_sz = 0;
@@ -343,8 +342,6 @@ int nmap_main(int argc, char *argv[]) {
   }
   fakeargv[argc] = NULL;
 
-  emptystring[0] = '\0'; /* It wouldn't be an empty string w/o this ;) */
-
   if (argc < 2 ) printusage(argv[0], -1);
   Targets.reserve(100);
 #ifdef WIN32


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

  By Date           By Thread  

Current thread:
  • [PATCH] Remove unused variable in nmap.cc Kris Katterjohn (Mar 06)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]