diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2014-03-26 09:02:42 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2014-03-26 11:29:53 +0100 |
commit | 5de5d8a5c0aa864bbf79a299cf5b9d5a1547941a (patch) | |
tree | a64ea5bbaac0a3f28dfb3bd7b68e933618758e38 /src | |
parent | 25c2f0d617259ed9bf9398b5042db78c8d17245d (diff) | |
download | coreutils-5de5d8a5c0aa864bbf79a299cf5b9d5a1547941a.tar.xz |
ptx: avoid --format long option falling through into --help
* src/ptx.c (main): Add a 'break' after the --format handling case.
Otherwise it would fall through into the usage case.
* tests/misc/ptx.pl: Add test cases for --format=tex and --format=roff.
* NEWS (Bug fixes): Mention the fix.
Bug introduced in 1999-04-04 commit, SH-UTILS-1_16f-269-gd815c15.
Spotted by coverity (MISSING_BREAK).
Diffstat (limited to 'src')
-rw-r--r-- | src/ptx.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2015,6 +2015,8 @@ main (int argc, char **argv) case 10: output_format = XARGMATCH ("--format", optarg, format_args, format_vals); + break; + case_GETOPT_HELP_CHAR; case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); |