All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/6] fdisk: remove bogus statement
@ 2012-05-20 16:11 Davidlohr Bueso
  0 siblings, 0 replies; only message in thread
From: Davidlohr Bueso @ 2012-05-20 16:11 UTC (permalink / raw)
  To: Karel Zak, Petr Uzel; +Cc: util-linux

From: Davidlohr Bueso <dave@gnu.org>

usage() does not return, also move the help option handling to the bottom of the switch.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 fdisk/fdisk.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 2f3c119..9387795 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -2095,8 +2095,8 @@ static void command_prompt(void)
 	}
 }
 
-int
-main(int argc, char **argv) {
+int main(int argc, char **argv)
+{
 	int j, c;
 	int optl = 0, opts = 0;
 
@@ -2130,9 +2130,6 @@ main(int argc, char **argv) {
 			else if (optarg && strcmp(optarg, "=nondos"))
 				usage(stderr);
 			break;
-		case 'h':
-			usage(stdout);
-			break;
 		case 'H':
 			user_heads = strtou32_or_err(optarg, _("invalid heads argument"));
 			if (user_heads > 256)
@@ -2160,6 +2157,8 @@ main(int argc, char **argv) {
 		case 'v':
 			printf(UTIL_LINUX_VERSION);
 			return EXIT_SUCCESS;
+		case 'h':
+			usage(stdout);
 		default:
 			usage(stderr);
 		}
-- 
1.7.4.1





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-20 16:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-20 16:11 [PATCH 2/6] fdisk: remove bogus statement Davidlohr Bueso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.