Skip to content

Commit 3b55630

Browse files
committed
Remove old debug code from print-ascii.c. [skip ci]
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.
1 parent e92d947 commit 3b55630

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

print-ascii.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -214,22 +214,3 @@ hex_print(netdissect_options *ndo,
214214
{
215215
hex_print_with_offset(ndo, indent, cp, length, 0);
216216
}
217-
218-
#ifdef MAIN
219-
int
220-
main(int argc, char *argv[])
221-
{
222-
hex_print("\n\t", "Hello, World!\n", 14);
223-
printf("\n");
224-
hex_and_ascii_print("\n\t", "Hello, World!\n", 14);
225-
printf("\n");
226-
ascii_print("Hello, World!\n", 14);
227-
printf("\n");
228-
#define TMSG "Now is the winter of our discontent...\n"
229-
hex_print_with_offset("\n\t", TMSG, sizeof(TMSG) - 1, 0x100);
230-
printf("\n");
231-
hex_and_ascii_print_with_offset("\n\t", TMSG, sizeof(TMSG) - 1, 0x100);
232-
printf("\n");
233-
exit(0);
234-
}
235-
#endif /* MAIN */

0 commit comments

Comments
 (0)