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/etc-cleanup/main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/etc-cleanup/main.c') diff --git a/src/etc-cleanup/main.c b/src/etc-cleanup/main.c index 6c7bea6d6..f15ba53cd 100644 --- a/src/etc-cleanup/main.c +++ b/src/etc-cleanup/main.c @@ -212,13 +212,16 @@ static void process_file(const char *fname) { } } +static const char *const usage_str = + "usage: cleanup-etc [options] file.profile [file.profile]\n" + "Group and clean private-etc entries in one or more profile files.\n" + "Options:\n" + " --debug - print debug messages\n" + " -h, -?, --help - this help screen\n" + " --replace - replace profile file\n"; + static void usage(void) { - printf("usage: cleanup-etc [options] file.profile [file.profile]\n"); - printf("Group and clean private-etc entries in one or more profile files.\n"); - printf("Options:\n"); - printf(" --debug - print debug messages\n"); - printf(" -h, -?, --help - this help screen\n"); - printf(" --replace - replace profile file\n"); + puts(usage_str); } int main(int argc, char **argv) { -- cgit v1.2.3-70-g09d2