Ethereal-dev: [Ethereal-dev] Removal of unneeded includes

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Tue, 9 Jul 2002 15:19:34 +0200
Moin,

the attached patch removes some includes from some files. It looks to
me that some of the includes have been copied over from the very beginning,
although they are no longer needed today. Please have a look whether this
is ok. Also, if nobody complains, I'll remove netinet/in.h from as many
files as possible (I guess that should be all outside wiretap).
If have chosen the files randomly and if I have missed includes to remove
from these please let me know also.

 Ciao
     Jörg
--
Joerg Mayer                                          <jmayer@xxxxxxxxx>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.
Changelog: <jmayer@xxxxxxxxx>
	file.c, packet-afs.c, packet-aim.c, packet-dcerpc-nt.c,
	packet-ip.c, packet-smb-common.h, packet-tftp.c, packet-vines.c
	packet-tns.c:
	Remove unneeded includes (netinet/in.h, stdio.h, sys/types.h,
	string.h, snprintf.h, ctype.h)
	Push down string.h from packet-smb-common.h to packet-dcerpc-nt.c

Index: ethereal/file.c
===================================================================
RCS file: /cvsroot/ethereal/file.c,v
retrieving revision 1.280
diff -u -r1.280 file.c
--- file.c	2002/06/29 09:45:06	1.280
+++ file.c	2002/07/09 13:02:01
@@ -64,10 +64,6 @@
 # include <sys/types.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
 #include <epan/epan.h>
 #include <epan/filesystem.h>
 
Index: ethereal/packet-afs.c
===================================================================
RCS file: /cvsroot/ethereal/packet-afs.c,v
retrieving revision 1.47
diff -u -r1.47 packet-afs.c
--- packet-afs.c	2002/06/13 06:43:44	1.47
+++ packet-afs.c	2002/07/09 13:02:01
@@ -41,10 +41,6 @@
 # include <sys/types.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
 #include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
Index: ethereal/packet-aim.c
===================================================================
RCS file: /cvsroot/ethereal/packet-aim.c,v
retrieving revision 1.14
diff -u -r1.14 packet-aim.c
--- packet-aim.c	2002/01/24 09:20:47	1.14
+++ packet-aim.c	2002/07/09 13:02:02
@@ -36,10 +36,6 @@
 # include <sys/types.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
 #include <glib.h>
 
 #ifdef NEED_SNPRINTF_H
Index: ethereal/packet-dcerpc-nt.c
===================================================================
RCS file: /cvsroot/ethereal/packet-dcerpc-nt.c,v
retrieving revision 1.41
diff -u -r1.41 packet-dcerpc-nt.c
--- packet-dcerpc-nt.c	2002/06/28 07:17:34	1.41
+++ packet-dcerpc-nt.c	2002/07/09 13:02:02
@@ -27,6 +27,7 @@
 #include "config.h"
 #endif
 
+#include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
 #include "packet-dcerpc.h"
Index: ethereal/packet-ip.c
===================================================================
RCS file: /cvsroot/ethereal/packet-ip.c,v
retrieving revision 1.170
diff -u -r1.170 packet-ip.c
--- packet-ip.c	2002/06/09 01:03:17	1.170
+++ packet-ip.c	2002/07/09 13:02:04
@@ -26,21 +26,7 @@
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
 #include <glib.h>
-
-#ifdef NEED_SNPRINTF_H
-# include "snprintf.h"
-#endif
 
 #include <epan/packet.h>
 #include <epan/resolv.h>
Index: ethereal/packet-smb-common.h
===================================================================
RCS file: /cvsroot/ethereal/packet-smb-common.h,v
retrieving revision 1.12
diff -u -r1.12 packet-smb-common.h
--- packet-smb-common.h	2002/05/24 10:57:38	1.12
+++ packet-smb-common.h	2002/07/09 13:02:04
@@ -32,20 +32,7 @@
 # include "config.h"
 #endif
 
-#include <stdio.h>
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
-#include <time.h>
-#include <string.h>
 #include <glib.h>
-#include <ctype.h>
 #include <epan/packet.h>
 #include <epan/conversation.h>
 #include "smb.h"
Index: ethereal/packet-tftp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-tftp.c,v
retrieving revision 1.38
diff -u -r1.38 packet-tftp.c
--- packet-tftp.c	2002/06/13 08:48:43	1.38
+++ packet-tftp.c	2002/07/09 13:02:04
@@ -36,9 +36,6 @@
 # include <sys/types.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
 
 #include <glib.h>
 #include <epan/packet.h>
Index: ethereal/packet-vines.c
===================================================================
RCS file: /cvsroot/ethereal/packet-vines.c,v
retrieving revision 1.41
diff -u -r1.41 packet-vines.c
--- packet-vines.c	2002/05/30 01:56:55	1.41
+++ packet-vines.c	2002/07/09 13:02:05
@@ -29,15 +29,6 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
 #include "packet-vines.h"
Index: ethereal/packet-tns.c
===================================================================
RCS file: /cvsroot/ethereal/packet-tns.c,v
retrieving revision 1.33
diff -u -r1.33 packet-tns.c
--- packet-tns.c	2002/07/08 22:57:55	1.33
+++ packet-tns.c	2002/07/09 13:07:15
@@ -28,17 +28,6 @@
 # include "config.h"
 #endif
 
-#include <stdio.h>
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
-#include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
 #include "packet-tcp.h"