All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - clang: add extra check
Date: Wed, 16 Feb 2022 00:03:11 +0000 (GMT)	[thread overview]
Message-ID: <20220216000311.2D38D3858C1F@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d2e7a05573f54750d13c1154036ae2c67478539b
Commit:        d2e7a05573f54750d13c1154036ae2c67478539b
Parent:        c2679f76e5c1733451361b593fa45ba9545250b1
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Tue Feb 8 19:17:30 2022 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Feb 16 01:00:36 2022 +0100

clang: add extra check

Make clang happier.
---
 lib/metadata/metadata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index db0e511ec..1cda1888f 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -2197,7 +2197,7 @@ static int _validate_lock_args_chars(const char *lock_args)
 
 static int _validate_vg_lock_args(struct volume_group *vg)
 {
-	if (!_validate_lock_args_chars(vg->lock_args)) {
+	if (!vg->lock_args || !_validate_lock_args_chars(vg->lock_args)) {
 		log_error(INTERNAL_ERROR "VG %s has invalid lock_args chars", vg->name);
 		return 0;
 	}



                 reply	other threads:[~2022-02-16  0:03 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=20220216000311.2D38D3858C1F@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.