]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ascii.c
Use more the EXTRACT_U_1() macro (47/n)
[tcpdump] / print-ascii.c
index 3cefef33aeb4f8578138e81e49e857b623aa3a9f..151e5c2867a1b7f50892552c1911e38d5b4bb94e 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define NETDISSECT_REWORKED
+/* \summary: ASCII packet dump printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 #include <stdio.h>
 
-#include "interface.h"
+#include "netdissect.h"
+#include "extract.h"
 
 #define ASCII_LINELENGTH 300
 #define HEXDUMP_BYTES_PER_LINE 16
@@ -77,7 +79,7 @@ ascii_print(netdissect_options *ndo,
                         *
                         * In the middle of a line, just print a '.'.
                         */
-                       if (length > 1 && *cp != '\n')
+                       if (length > 1 && EXTRACT_U_1(cp) != '\n')
                                ND_PRINT((ndo, "."));
                } else {
                        if (!ND_ISGRAPH(s) &&