All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-media@vger.kernel.org
Subject: [PATCH 5/7] media-info: fix NULL check
Date: Mon, 20 Apr 2020 11:46:47 -0700	[thread overview]
Message-ID: <20200420184649.4202-5-rosenp@gmail.com> (raw)
In-Reply-To: <20200420184649.4202-1-rosenp@gmail.com>

Found with clang-tidy's bugprone-bool-pointer-implicit-conversion

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/common/media-info.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp
index b0f0bc41..cb48d0df 100644
--- a/utils/common/media-info.cpp
+++ b/utils/common/media-info.cpp
@@ -357,7 +357,7 @@ std::string mi_entfunction2s(__u32 function, bool *is_invalid)
 			return fail ? entity_functions_def[i].str + 6 : entity_functions_def[i].str;
 		}
 	}
-	if (is_invalid)
+	if (is_invalid != NULL)
 		return "WARNING: Unknown Function (" + num2s(function) + "), is v4l2-compliance out-of-date?";
 	return "Unknown Function (" + num2s(function) + ")";
 }
-- 
2.25.2


  parent reply	other threads:[~2020-04-20 18:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 18:46 [PATCH 1/7] treewide: fix mismatching declarations Rosen Penev
2020-04-20 18:46 ` [PATCH 2/7] treewide: replace C casts with C++ Rosen Penev
2020-04-20 18:46 ` [PATCH 3/7] treewide: fix wrong *cmp function usage Rosen Penev
2020-04-21  7:31   ` Hans Verkuil
2020-04-20 18:46 ` [PATCH 4/7] treewide: apply performance fixes Rosen Penev
2020-04-20 18:46 ` Rosen Penev [this message]
2020-04-21  8:41   ` [PATCH 5/7] media-info: fix NULL check Hans Verkuil
2020-04-20 18:46 ` [PATCH 6/7] utils: use bool literals Rosen Penev
2020-04-21  8:44   ` Hans Verkuil
2020-04-20 18:46 ` [PATCH 7/7] utils: do not use empty void with C++ Rosen Penev
2020-04-21  7:23 ` [PATCH 1/7] treewide: fix mismatching declarations Hans Verkuil
2020-04-21  7:26   ` Hans Verkuil

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=20200420184649.4202-5-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=linux-media@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 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.