From 5d459d6b07206963a022e9a95ea9d8c18dc0eab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 30 Jul 2014 15:38:54 -0400 Subject: [PATCH] Constify option table and add missing option --- src/analyze/analyze.c | 1 + src/bootchart/bootchart.c | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 453ad335a14..888f6b7a664 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -1244,6 +1244,7 @@ static int parse_argv(int argc, char *argv[]) { { "to-pattern", required_argument, NULL, ARG_DOT_TO_PATTERN }, { "fuzz", required_argument, NULL, ARG_FUZZ }, { "no-pager", no_argument, NULL, ARG_NO_PAGER }, + { "no-man", no_argument, NULL, ARG_NO_MAN }, { "host", required_argument, NULL, 'H' }, { "machine", required_argument, NULL, 'M' }, {} diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index cbfc28d2f13..692cbb983f4 100644 --- a/src/bootchart/bootchart.c +++ b/src/bootchart/bootchart.c @@ -164,21 +164,21 @@ static void help(void) { } static int parse_args(int argc, char *argv[]) { - static struct option options[] = { - {"rel", no_argument, NULL, 'r'}, - {"freq", required_argument, NULL, 'f'}, - {"samples", required_argument, NULL, 'n'}, - {"pss", no_argument, NULL, 'p'}, - {"output", required_argument, NULL, 'o'}, - {"init", required_argument, NULL, 'i'}, - {"no-filter", no_argument, NULL, 'F'}, - {"cmdline", no_argument, NULL, 'C'}, - {"control-group", no_argument, NULL, 'c'}, - {"help", no_argument, NULL, 'h'}, - {"scale-x", required_argument, NULL, 'x'}, - {"scale-y", required_argument, NULL, 'y'}, - {"entropy", no_argument, NULL, 'e'}, - {NULL, 0, NULL, 0} + static const struct option options[] = { + {"rel", no_argument, NULL, 'r'}, + {"freq", required_argument, NULL, 'f'}, + {"samples", required_argument, NULL, 'n'}, + {"pss", no_argument, NULL, 'p'}, + {"output", required_argument, NULL, 'o'}, + {"init", required_argument, NULL, 'i'}, + {"no-filter", no_argument, NULL, 'F'}, + {"cmdline", no_argument, NULL, 'C'}, + {"control-group", no_argument, NULL, 'c'}, + {"help", no_argument, NULL, 'h'}, + {"scale-x", required_argument, NULL, 'x'}, + {"scale-y", required_argument, NULL, 'y'}, + {"entropy", no_argument, NULL, 'e'}, + {} }; int c;