Nmap Development mailing list archives

[PATCH] Make TCPIP_DEBUGGING tested by preprocessor


From: Kris Katterjohn <katterjohn () gmail com>
Date: Mon, 11 Dec 2006 10:09:54 -0600

This makes the TCPIP_DEBUGGING macro tested in a CPP-#if instead of in a
C-if() in osscan2.cc. In other words, it just prevents an extra if()
from being compiled in when it's never true, or having an if() when it's
always true.

It's a diff against 4.20ALPHA1

Thanks,
Kris Katterjohn
--- x/osscan2.cc        2006-12-07 20:11:08.000000000 -0600
+++ y/osscan2.cc        2006-12-11 09:40:01.000000000 -0600
@@ -3088,10 +3088,11 @@ int send_closedudp_probe_2(struct udppro
       upi.patternbyte = patternbyte;
       upi.target.s_addr = ip->ip_dst.s_addr;
     }
-    if (TCPIP_DEBUGGING > 1) {
-      log_write(LOG_STDOUT, "Raw UDP packet creation completed!  Here it is:\n");
-      readudppacket(packet,1);
-    }
+
+#if TCPIP_DEBUGGING > 1
+    log_write(LOG_STDOUT, "Raw UDP packet creation completed!  Here it is:\n");
+    readudppacket(packet,1);
+#endif
   
     if ((res = send_ip_packet(sd, eth, packet, ntohs(ip->ip_len))) == -1)
       {


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

Current thread: