Skip to contentSkip to conversation

fdisk: remove bogus statement

PATCH Applied Davidlohr Bueso 1 participant 1 message May 20, 2012 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 fdisk: remove bogus statement

From: Davidlohr Bueso <[email protected]>

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

---
 fdisk/fdisk.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
fdisk/fdisk.c +4 -5
index 2f3c119..9387795 100644
@@ -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);
 		}
Signature · 1 line
1.7.4.1