]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Lose underscores in some macro names. [skip ci]
authorDenis Ovsienko <[email protected]>
Sun, 13 Sep 2020 15:06:43 +0000 (16:06 +0100)
committerDenis Ovsienko <[email protected]>
Sun, 13 Sep 2020 15:06:43 +0000 (16:06 +0100)
ah.h
cpack.h
getservent.h
ip6.h
missing/getopt_long.h
timeval-operations.h

diff --git a/ah.h b/ah.h
index 90c5601008a2cb383e3e5e43f4c29e776af2ec57..3a9dbd80b9ed43f6d18c70bccc2c91f61ebe6402 100644 (file)
--- a/ah.h
+++ b/ah.h
@@ -34,8 +34,8 @@
  * RFC1826/2402 authentication header.
  */
 
-#ifndef _NETINET6_AH_H_
-#define _NETINET6_AH_H_
+#ifndef ND_AH_H_
+#define ND_AH_H_
 
 struct ah {
        nd_uint8_t      ah_nxt;         /* Next Header */
@@ -54,4 +54,4 @@ struct newah {
        /* variable size, 32bit bound*/ /* Authentication data */
 };
 
-#endif /*_NETINET6_AH_H_*/
+#endif /* ND_AH_H_ */
diff --git a/cpack.h b/cpack.h
index 6e709778a09b29ef2dc80d5288650e74ee8fe5dd..71ab4f877e7158600fdca246756f807c16de5a27 100644 (file)
--- a/cpack.h
+++ b/cpack.h
@@ -27,8 +27,8 @@
  * OF SUCH DAMAGE.
  */
 
-#ifndef _CPACK_H
-#define _CPACK_H
+#ifndef ND_CPACK_H
+#define ND_CPACK_H
 
 #include "netdissect.h"
 
@@ -54,4 +54,4 @@ const uint8_t *cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize);
 
 extern int cpack_advance(struct cpack_state *, const size_t);
 
-#endif /* _CPACK_H */
+#endif /* ND_CPACK_H */
index 83ef86493edbb4bad7169a976e0db425f62d6523..6fa5f361d15b6b0079988cd101baa334ec41983e 100644 (file)
@@ -34,8 +34,8 @@
 * SUCH DAMAGE.
 */
 
-#ifndef _GETSERVENT_H
-#define _GETSERVENT_H
+#ifndef ND_GETSERVENT_H
+#define ND_GETSERVENT_H
 
 #ifdef _NETDB_H_
 /* Just in case... */
@@ -64,4 +64,4 @@ void endservent (void);
 struct servent *getservent(void);
 void setservent (int f);
 
-#endif /* !_GETSERVENT_H */
+#endif /* ! ND_GETSERVENT_H */
diff --git a/ip6.h b/ip6.h
index 5de36af02733091289b1a79f55c50b8f70242cd3..28725d05eff971a9d0fc9898a03f230bdd71012c 100644 (file)
--- a/ip6.h
+++ b/ip6.h
@@ -65,8 +65,8 @@
  *     @(#)ip.h        8.1 (Berkeley) 6/10/93
  */
 
-#ifndef _NETINET_IP6_H_
-#define _NETINET_IP6_H_
+#ifndef ND_IP6_H_
+#define ND_IP6_H_
 
 /*
  * Definition for internet protocol version 6.
@@ -209,4 +209,4 @@ struct ip6_frag {
 #define IP6F_RESERVED_MASK     0x0006  /* reserved bits in ip6f_offlg */
 #define IP6F_MORE_FRAG         0x0001  /* more-fragments flag */
 
-#endif /* not _NETINET_IP6_H_ */
+#endif /* not ND_IP6_H_ */
index fbb94e6bff7793fd8c2e0a647cb51a064fef7938..af97965e4f7332101a6bc11f5c59a47bc4c1788a 100644 (file)
@@ -30,8 +30,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef _GETOPT_LONG_H_
-#define _GETOPT_LONG_H_
+#ifndef ND_GETOPT_LONG_H_
+#define ND_GETOPT_LONG_H_
 
 /*
  * GNU-like getopt_long()/getopt_long_only() with 4.4BSD optreset extension.
@@ -63,4 +63,4 @@ int   getopt_long_only(int, char * const *, const char *,
 extern char *optarg;                   /* getopt(3) external variables */
 extern int optind, opterr, optopt;
 
-#endif /* !_GETOPT_LONG_H_ */
+#endif /* ! ND_GETOPT_LONG_H_ */
index 2848cdcfc5ea7ff9a1caa7abbd31eb8f030f9332..177027db031d91267e0c7866c69c862f2956008e 100644 (file)
 
 /* Operations on timevals. */
 
-#ifndef _MICRO_PER_SEC
-#define _MICRO_PER_SEC 1000000
-#endif
-
-#ifndef _NANO_PER_SEC
-#define _NANO_PER_SEC 1000000000
-#endif
+#define ND_MICRO_PER_SEC 1000000
+#define ND_NANO_PER_SEC 1000000000
 
 #define netdissect_timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
 
                (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;    \
                (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
                if (nano_prec) {                                  \
-                       if ((vvp)->tv_usec >= _NANO_PER_SEC) {    \
+                       if ((vvp)->tv_usec >= ND_NANO_PER_SEC) {  \
                                (vvp)->tv_sec++;                  \
-                               (vvp)->tv_usec -= _NANO_PER_SEC;  \
+                               (vvp)->tv_usec -= ND_NANO_PER_SEC; \
                        }                                         \
                } else {                                          \
-                       if ((vvp)->tv_usec >= _MICRO_PER_SEC) {   \
+                       if ((vvp)->tv_usec >= ND_MICRO_PER_SEC) { \
                                (vvp)->tv_sec++;                  \
-                               (vvp)->tv_usec -= _MICRO_PER_SEC; \
+                               (vvp)->tv_usec -= ND_MICRO_PER_SEC; \
                        }                                         \
                }                                                 \
        } while (0)
@@ -70,8 +65,8 @@
                (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;  \
                if ((vvp)->tv_usec < 0) {                          \
                    (vvp)->tv_sec--;                               \
-                   (vvp)->tv_usec += (nano_prec ? _NANO_PER_SEC : \
-                                      _MICRO_PER_SEC);            \
+                   (vvp)->tv_usec += (nano_prec ? ND_NANO_PER_SEC : \
+                                      ND_MICRO_PER_SEC);          \
                }                                                  \
        } while (0)