]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Re-fix indentation.
[tcpdump] / print-ip.c
index b1deb78a0ee62386a825f2c510a84c7bedbf6638..1e9f1ed9e6fcd348bbc25ea5cf30877283f2ac73 100644 (file)
@@ -56,10 +56,10 @@ static const struct tok ip_option_values[] = {
  */
 static int
 ip_printroute(netdissect_options *ndo,
-              register const u_char *cp, u_int length)
+              const u_char *cp, u_int length)
 {
-       register u_int ptr;
-       register u_int len;
+       u_int ptr;
+       u_int len;
 
        if (length < 3) {
                ND_PRINT((ndo, " [bad length %u]", length));
@@ -118,7 +118,7 @@ ip_finddst(netdissect_options *ndo,
                        if (len < 2)
                                break;
                }
-               ND_TCHECK2(*cp, len);
+               ND_TCHECK_LEN(cp, len);
                switch (tt) {
 
                case IPOPT_SSRR:
@@ -170,10 +170,10 @@ nextproto4_cksum(netdissect_options *ndo,
 
 static int
 ip_printts(netdissect_options *ndo,
-           register const u_char *cp, u_int length)
+           const u_char *cp, u_int length)
 {
-       register u_int ptr;
-       register u_int len;
+       u_int ptr;
+       u_int len;
        int hoplen;
        const char *type;
 
@@ -220,7 +220,7 @@ ip_printts(netdissect_options *ndo,
        for (len = 4; len < length; len += hoplen) {
                if (ptr == len)
                        type = " ^ ";
-               ND_TCHECK2(cp[len], hoplen);
+               ND_TCHECK_LEN(cp + len, hoplen);
                ND_PRINT((ndo, "%s%d@%s", type, EXTRACT_BE_U_4(cp + len + hoplen - 4),
                          hoplen!=8 ? "" : ipaddr_string(ndo, cp + len)));
                type = " ";
@@ -244,9 +244,9 @@ trunc:
  */
 static void
 ip_optprint(netdissect_options *ndo,
-            register const u_char *cp, u_int length)
+            const u_char *cp, u_int length)
 {
-       register u_int option_len;
+       u_int option_len;
        const char *sep = "";
 
        for (; length > 0; cp += option_len, length -= option_len) {
@@ -279,7 +279,7 @@ ip_optprint(netdissect_options *ndo,
                        return;
                }
 
-               ND_TCHECK2(*cp, option_len);
+               ND_TCHECK_LEN(cp, option_len);
 
                switch (option_code) {
                case IPOPT_EOL:
@@ -346,7 +346,7 @@ again:
        switch (ipds->nh) {
 
        case IPPROTO_AH:
-               if (!ND_TTEST(*ipds->cp)) {
+               if (!ND_TTEST_1(ipds->cp)) {
                        ND_PRINT((ndo, "[|AH]"));
                        break;
                }
@@ -706,7 +706,7 @@ trunc:
 }
 
 void
-ipN_print(netdissect_options *ndo, register const u_char *bp, register u_int length)
+ipN_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
        if (length < 1) {
                ND_PRINT((ndo, "truncated-ip %d", length));