]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove unused macros in nameser.h
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 10 Dec 2017 21:21:37 +0000 (22:21 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 10 Dec 2017 21:21:37 +0000 (22:21 +0100)
nameser.h

index 4e08c7b98af0d091f9963519465d24a9cb28f2b6..b430c9db8b9dad9a30efed11ec6af8e51c6a60d2 100644 (file)
--- a/nameser.h
+++ b/nameser.h
@@ -252,49 +252,4 @@ struct rrec {
        char    *r_data;                /* pointer to data */
 };
 
-/*
- * Inline versions of get/put short/long.  Pointer is advanced.
- * We also assume that a "uint16_t" holds 2 "chars"
- * and that a "uint32_t" holds 4 "chars".
- *
- * These macros demonstrate the property of C whereby it can be
- * portable or it can be elegant but never both.
- */
-#define GETSHORT(s, cp) { \
-       register u_char *t_cp = (u_char *)(cp); \
-       (s) = ((uint16_t)t_cp[0] << 8) | (uint16_t)t_cp[1]; \
-       (cp) += 2; \
-}
-
-#define GETLONG(l, cp) { \
-       register u_char *t_cp = (u_char *)(cp); \
-       (l) = (((uint32_t)t_cp[0]) << 24) \
-           | (((uint32_t)t_cp[1]) << 16) \
-           | (((uint32_t)t_cp[2]) << 8) \
-           | (((uint32_t)t_cp[3])); \
-       (cp) += 4; \
-}
-
-#define PUTSHORT(s, cp) { \
-       register uint16_t t_s = (uint16_t)(s); \
-       register u_char *t_cp = (u_char *)(cp); \
-       *t_cp++ = t_s >> 8; \
-       *t_cp   = t_s; \
-       (cp) += 2; \
-}
-
-/*
- * Warning: PUTLONG --no-longer-- destroys its first argument.  if you
- * were depending on this "feature", you will lose.
- */
-#define PUTLONG(l, cp) { \
-       register uint32_t t_l = (uint32_t)(l); \
-       register u_char *t_cp = (u_char *)(cp); \
-       *t_cp++ = t_l >> 24; \
-       *t_cp++ = t_l >> 16; \
-       *t_cp++ = t_l >> 8; \
-       *t_cp   = t_l; \
-       (cp) += 4; \
-}
-
 #endif /* !_NAMESER_H_ */