All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - cleanup: simply code
Date: Tue, 23 Feb 2021 14:04:17 +0000 (GMT)	[thread overview]
Message-ID: <20210223140417.8B7223939C01@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b5f906e984abea169209302b78bfa935869d6ea4
Commit:        b5f906e984abea169209302b78bfa935869d6ea4
Parent:        5ecd65e6f2f5264b0ebe1177a714bc8d29e882fb
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Sat Feb 20 22:11:30 2021 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Tue Feb 23 14:56:48 2021 +0100

cleanup: simply code

---
 tools/lvresize.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/lvresize.c b/tools/lvresize.c
index 0c72a81ff..a3c17a744 100644
--- a/tools/lvresize.c
+++ b/tools/lvresize.c
@@ -146,14 +146,6 @@ static int _lvresize_params(struct cmd_context *cmd, int argc, char **argv,
 	lp->argc = --argc;
 	lp->argv = ++argv;
 
-	lp->alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, 0);
-	lp->yes = arg_is_set(cmd, yes_ARG);
-	lp->force = arg_is_set(cmd, force_ARG);
-	lp->nofsck = arg_is_set(cmd, nofsck_ARG);
-	lp->nosync = arg_is_set(cmd, nosync_ARG);
-	lp->resizefs = arg_is_set(cmd, resizefs_ARG);
-	lp->lockopt = arg_str_value(cmd, lockopt_ARG, NULL);
-
 	return 1;
 }
 
@@ -186,7 +178,15 @@ out:
 int lvresize(struct cmd_context *cmd, int argc, char **argv)
 {
 	struct processing_handle *handle;
-	struct lvresize_params lp = { 0 };
+	struct lvresize_params lp = {
+		.alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, 0),
+		.yes = arg_is_set(cmd, yes_ARG),
+		.force = arg_is_set(cmd, force_ARG),
+		.nofsck = arg_is_set(cmd, nofsck_ARG),
+		.nosync = arg_is_set(cmd, nosync_ARG),
+		.resizefs = arg_is_set(cmd, resizefs_ARG),
+		.lockopt = arg_str_value(cmd, lockopt_ARG, NULL),
+	};
 	int ret;
 
 	if (!_lvresize_params(cmd, argc, argv, &lp)) {



                 reply	other threads:[~2021-02-23 14:04 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=20210223140417.8B7223939C01@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /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 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.