From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - cleanup: simplify
Date: Thu, 6 Apr 2023 11:47:35 +0000 (GMT) [thread overview]
Message-ID: <20230406114735.5328F385842A@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1fb3e08033570365580b576777e312d2f9c2d86d
Commit: 1fb3e08033570365580b576777e312d2f9c2d86d
Parent: a7cf55c6a19a0a70dab7f2b8a406d52e24d5e3cd
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Wed Mar 1 21:05:47 2023 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Thu Apr 6 11:06:04 2023 +0200
cleanup: simplify
---
lib/metadata/integrity_manip.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/metadata/integrity_manip.c b/lib/metadata/integrity_manip.c
index ffb869b08..456795532 100644
--- a/lib/metadata/integrity_manip.c
+++ b/lib/metadata/integrity_manip.c
@@ -936,7 +936,9 @@ int lv_integrity_mismatches(struct cmd_context *cmd,
const struct logical_volume *lv,
uint64_t *mismatches)
{
- struct lv_with_info_and_seg_status status;
+ struct lv_with_info_and_seg_status status = {
+ .seg_status.type = SEG_STATUS_NONE,
+ };
if (lv_is_raid(lv) && lv_raid_has_integrity((struct logical_volume *)lv))
return lv_raid_integrity_total_mismatches(cmd, lv, mismatches);
@@ -944,9 +946,6 @@ int lv_integrity_mismatches(struct cmd_context *cmd,
if (!lv_is_integrity(lv))
return_0;
- memset(&status, 0, sizeof(status));
- status.seg_status.type = SEG_STATUS_NONE;
-
status.seg_status.seg = first_seg(lv);
/* FIXME: why reporter_pool? */
next reply other threads:[~2023-04-06 11:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 11:47 Zdenek Kabelac [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-15 10:14 main - cleanup: simplify Zdenek Kabelac
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=20230406114735.5328F385842A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).