From 0559d06f61cd3f30b5925fe062654eca83eb6dd6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 11 Jun 2010 15:42:45 -0700 Subject: Tidy up switch statements --- src/compare_hkl.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/compare_hkl.c') diff --git a/src/compare_hkl.c b/src/compare_hkl.c index f58c5046..9f39ee09 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -67,34 +67,28 @@ int main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "ho:a:b:", longopts, NULL)) != -1) { switch (c) { - case 'h' : { + case 'h' : show_help(argv[0]); return 0; - } - case 'o' : { + case 'o' : outfile = strdup(optarg); break; - } - case 'a' : { + case 'a' : afile = strdup(optarg); break; - } - case 'b' : { + case 'b' : bfile = strdup(optarg); break; - } - case 0 : { + case 0 : break; - } - default : { + default : return 1; } - } } -- cgit v1.2.3