fddi_bitswap is only used once, and it just adds a layer of indirection
to its preprocessor condition.
This also removes macros for BSDi and Ultrix.
ok?
Index: print-fddi.c
===================================================================
RCS file: /cvs/src/usr.sbin/tcpdump/print-fddi.c,v
retrieving revision 1.17
diff -u -p -r1.17 print-fddi.c
--- print-fddi.c 16 Nov 2015 00:16:39 -0000 1.17
+++ print-fddi.c 26 Jan 2016 03:47:55 -0000
@@ -48,16 +48,6 @@ struct rtentry;
#include "fddi.h"
/*
- * Some FDDI interfaces use bit-swapped addresses.
- */
-#if defined(ultrix) || defined(__alpha) || defined(__bsdi) || \
- defined(__NetBSD__) || defined(__OpenBSD__)
-int fddi_bitswap = 0;
-#else
-int fddi_bitswap = 1;
-#endif
-
-/*
* FDDI support for tcpdump, by Jeffrey Mogul [DECWRL], June 1992
*
* Based in part on code by Van Jacobson, which bears this note:
@@ -200,20 +190,22 @@ extract_fddi_addrs(const struct fddi_hea
{
int i;
- if (fddi_bitswap) {
- /*
- * bit-swap the fddi addresses (isn't the IEEE standards
- * process wonderful!) then convert them to names.
- */
- for (i = 0; i < 6; ++i)
- fdst[i] = fddi_bit_swap[fddip->fddi_dhost[i]];
- for (i = 0; i < 6; ++i)
- fsrc[i] = fddi_bit_swap[fddip->fddi_shost[i]];
- }
- else {
- memcpy(fdst, (char *)fddip->fddi_dhost, 6);
- memcpy(fsrc, (char *)fddip->fddi_shost, 6);
- }
+ /*
+ * Some FDDI interfaces use bit-swapped addresses.
+ */
+#if defined(__alpha) || defined(__NetBSD__) || defined(__OpenBSD__)
+ memcpy(fdst, (char *)fddip->fddi_dhost, 6);
+ memcpy(fsrc, (char *)fddip->fddi_shost, 6);
+#else
+ /*
+ * bit-swap the fddi addresses (isn't the IEEE standards
+ * process wonderful!) then convert them to names.
+ */
+ for (i = 0; i < 6; ++i)
+ fdst[i] = fddi_bit_swap[fddip->fddi_dhost[i]];
+ for (i = 0; i < 6; ++i)
+ fsrc[i] = fddi_bit_swap[fddip->fddi_shost[i]];
+#endif
}
/*