]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use fn_print_char() to simplify some code
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 14 Feb 2018 12:58:11 +0000 (13:58 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 14 Feb 2018 12:58:11 +0000 (13:58 +0100)
print-krb.c

index 48c448bdd635e9546d3f7bd1db82bf199e7e40d6..5e7cb4128bc6e0bad2aced7a7de94c5854449143 100644 (file)
@@ -125,15 +125,7 @@ c_print(netdissect_options *ndo,
                        flag = 0;
                        break;
                }
-               if (!ND_ISASCII(c)) {
-                       c = ND_TOASCII(c);
-                       ND_PRINT("M-");
-               }
-               if (!ND_ISPRINT(c)) {
-                       c ^= 0x40;      /* DEL to ?, others to alpha */
-                       ND_PRINT("^");
-               }
-               ND_PRINT("%c", c);
+               fn_print_char(ndo, c);
        }
        if (flag)
                return NULL;