[v2] abipkgdiff: Remove useless code to process kernel RPM packages

Message ID 20230307185728.107659-1-guillermo.e.martinez@oracle.com
State New
Headers
Series [v2] abipkgdiff: Remove useless code to process kernel RPM packages |

Commit Message

Guillermo E. Martinez March 7, 2023, 6:57 p.m. UTC
  In `abipkgdiff' working with a `kernel' package, the function
`get_vmlinux_path_from_kernel_dist' that looks for  `vmlinux' file
in never reached, due to check an useless predicate.

	* tools/abipkgdiff.cc
	(compare_prepared_linux_kernel_packages): Remove useless predicate.

Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
---
 tools/abipkgdiff.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Patch

diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc
index c2fc09ca..46b920a1 100644
--- a/tools/abipkgdiff.cc
+++ b/tools/abipkgdiff.cc
@@ -3106,8 +3106,7 @@  compare_prepared_linux_kernel_packages(package& first_package,
 
   string vmlinux_path1, vmlinux_path2;
 
-  if (!vmlinux_path1.empty()
-      && !get_vmlinux_path_from_kernel_dist(debug_dir1, vmlinux_path1))
+  if (!get_vmlinux_path_from_kernel_dist(debug_dir1, vmlinux_path1))
     {
       emit_prefix("abipkgdiff", cerr)
 	<< "Could not find vmlinux in debuginfo package '"
@@ -3116,8 +3115,7 @@  compare_prepared_linux_kernel_packages(package& first_package,
       return abigail::tools_utils::ABIDIFF_ERROR;
     }
 
-  if (!vmlinux_path2.empty()
-      && !get_vmlinux_path_from_kernel_dist(debug_dir2, vmlinux_path2))
+  if (!get_vmlinux_path_from_kernel_dist(debug_dir2, vmlinux_path2))
     {
       emit_prefix("abipkgdiff", cerr)
 	<< "Could not find vmlinux in debuginfo package '"