All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - cov: set error_vg only when pointer is non null
Date: Fri, 23 Apr 2021 21:05:42 +0000 (GMT)	[thread overview]
Message-ID: <20210423210542.806D0394480D@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7e77e250a9249f6b7c9bc63b88de393c02ef6a61
Commit:        7e77e250a9249f6b7c9bc63b88de393c02ef6a61
Parent:        d1f9845c96284ee72692b7701a2dd1b86006524e
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Thu Apr 22 12:41:25 2021 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Apr 23 22:58:45 2021 +0200

cov: set error_vg only when pointer is non null

---
 lib/metadata/metadata.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 4471f7c86..002d80c01 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4954,7 +4954,8 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const
 		log_very_verbose("Reading orphan VG %s.", vg_name);
 		vg = vg_read_orphans(cmd, vg_name);
 		*error_flags = 0;
-		*error_vg = NULL;
+		if (error_vg)
+			*error_vg = NULL;
 		return vg;
 	}
 



                 reply	other threads:[~2021-04-23 21:05 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=20210423210542.806D0394480D@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.