From 15ad8696c7cf95059f163b4f7ed86ca697e8fe1e Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Thu, 11 May 2023 18:51:02 -0300 Subject: Move usage text into usage_str var For consistency and readability. Note: This also makes exactly one extra blank line be printed at the end of every usage text, which is currently only done in the following files: * src/fcopy/main.c * src/fnettrace-dns/main.c * src/fnettrace-icmp/main.c * src/fnettrace-sni/main.c * src/fnettrace/main.c * src/profstats/main.c --- src/fnetfilter/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/fnetfilter/main.c') diff --git a/src/fnetfilter/main.c b/src/fnetfilter/main.c index 8c0f6c297..1b0335d68 100644 --- a/src/fnetfilter/main.c +++ b/src/fnetfilter/main.c @@ -45,9 +45,12 @@ static char *default_filter = "-A OUTPUT -p tcp --dport 3479 -j DROP\n" "COMMIT\n"; +static const char *const usage_str = + "Usage:\n" + "\tfnetfilter netfilter-command destination-file\n"; + static void usage(void) { - printf("Usage:\n"); - printf("\tfnetfilter netfilter-command destination-file\n"); + puts(usage_str); } static void err_exit_cannot_open_file(const char *fname) { -- cgit v1.2.3-70-g09d2