]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove old debug code from print-ascii.c. [skip ci]
authorDenis Ovsienko <[email protected]>
Thu, 25 Jan 2024 17:07:07 +0000 (17:07 +0000)
committerDenis Ovsienko <[email protected]>
Thu, 25 Jan 2024 17:16:39 +0000 (17:16 +0000)
Since commit ac910c0 in 2014 the main() function inside "#ifdef MAIN"
cannot be compiled because it does not match the prototypes of the
functions it tests.  Remove the conditional block instead of fixing it
because the existing tests among other things cover the functions in the
file.  This addresses GitHub bug #1079.

print-ascii.c

index ce97444554d0a5a3796c4b281359a6616e14f2ed..71db40dd243fa80f7f487d2d4b0959e4009f2769 100644 (file)
@@ -214,22 +214,3 @@ hex_print(netdissect_options *ndo,
 {
        hex_print_with_offset(ndo, indent, cp, length, 0);
 }
-
-#ifdef MAIN
-int
-main(int argc, char *argv[])
-{
-       hex_print("\n\t", "Hello, World!\n", 14);
-       printf("\n");
-       hex_and_ascii_print("\n\t", "Hello, World!\n", 14);
-       printf("\n");
-       ascii_print("Hello, World!\n", 14);
-       printf("\n");
-#define TMSG "Now is the winter of our discontent...\n"
-       hex_print_with_offset("\n\t", TMSG, sizeof(TMSG) - 1, 0x100);
-       printf("\n");
-       hex_and_ascii_print_with_offset("\n\t", TMSG, sizeof(TMSG) - 1, 0x100);
-       printf("\n");
-       exit(0);
-}
-#endif /* MAIN */