[PATCH 5/7] media-info: fix NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux