]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: remove bogus statement
authorDavidlohr Bueso <dave@gnu.org>
Sun, 20 May 2012 16:11:26 +0000 (18:11 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 23 May 2012 08:51:23 +0000 (10:51 +0200)
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

index 2f3c11900bc32dadcddfd1fb79bfb05dd81dc3c6..938779536c3015e8c0f257da3ad4e3daaa344cc1 100644 (file)
@@ -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);
                }