diff mbox series

[2/3] Fix readability-redundant-smartptr-get warnings

Message ID 20200903132205.589136-3-gprocida@google.com
State New
Headers show
Series clang-tidy error and warning fixes | expand

Commit Message

Giuliano Procida Sept. 3, 2020, 1:22 p.m. UTC
clang-tidy's readability-redundant-smartptr-get warning is triggered
when it detects a redundant "get" of various smart pointer types in
boolean context. This commit fixes these warnings.

	* tools/kmidiff.cc (main): Remove redundant .get() when
	testing smart pointers.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 tools/kmidiff.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tools/kmidiff.cc b/tools/kmidiff.cc
index 2840eb086..41584d3ae 100644
--- a/tools/kmidiff.cc
+++ b/tools/kmidiff.cc
@@ -416,7 +416,7 @@  main(int argc, char* argv[])
       file_type ftype = guess_file_type(opts.kernel_dist_root1);
       if (ftype == FILE_TYPE_DIR)
 	{
-	  debug_info_root_dir = opts.di_root_path1.get()
+	  debug_info_root_dir = opts.di_root_path1
 	    ? opts.di_root_path1.get()
 	    : "";
 
@@ -443,7 +443,7 @@  main(int argc, char* argv[])
       file_type ftype = guess_file_type(opts.kernel_dist_root2);
       if (ftype == FILE_TYPE_DIR)
 	{
-	  debug_info_root_dir = opts.di_root_path2.get()
+	  debug_info_root_dir = opts.di_root_path2
 	    ? opts.di_root_path2.get()
 	    : "";
 	  group2 =