From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>, Petr Uzel <petr.uzel@suse.cz>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH 2/6] fdisk: remove bogus statement
Date: Sun, 20 May 2012 18:11:26 +0200 [thread overview]
Message-ID: <1337530286.2677.13.camel@offbook> (raw)
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
reply other threads:[~2012-05-20 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337530286.2677.13.camel@offbook \
--to=dave@gnu.org \
--cc=kzak@redhat.com \
--cc=petr.uzel@suse.cz \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox