[v3,2/2] build: change libfdt flag variable type to boolean

Message ID 20230613153333.164365-3-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series replace int flags with booleans |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Bruce Richardson June 13, 2023, 3:33 p.m. UTC
  The has_libfdt flag was using 0 and 1 integer values, instead of the
more appropriate boolean type. Change to use true/false instead.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build             | 4 ++--
 drivers/net/ipn3ke/meson.build | 2 +-
 drivers/raw/ifpga/meson.build  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
  

Comments

David Marchand June 14, 2023, 12:42 p.m. UTC | #1
On Tue, Jun 13, 2023 at 5:34 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> The has_libfdt flag was using 0 and 1 integer values, instead of the
> more appropriate boolean type. Change to use true/false instead.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>
  

Patch

diff --git a/config/meson.build b/config/meson.build
index 8aebccbbdc..22d7d908b7 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -190,11 +190,11 @@  if find_libnuma
     endif
 endif
 
-has_libfdt = 0
+has_libfdt = false
 fdt_dep = cc.find_library('fdt', required: false)
 if fdt_dep.found() and cc.has_header('fdt.h')
     dpdk_conf.set10('RTE_HAS_LIBFDT', true)
-    has_libfdt = 1
+    has_libfdt = true
     add_project_link_arguments('-lfdt', language: 'c')
     dpdk_extra_ldflags += '-lfdt'
 endif
diff --git a/drivers/net/ipn3ke/meson.build b/drivers/net/ipn3ke/meson.build
index 104d2f58e5..464bdbd8b6 100644
--- a/drivers/net/ipn3ke/meson.build
+++ b/drivers/net/ipn3ke/meson.build
@@ -15,7 +15,7 @@  endif
 #  rte_eth_switch_domain_free()
 #
 
-if has_libfdt == 0
+if not has_libfdt
     build = false
     reason = 'missing dependency, "libfdt"'
     subdir_done()
diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
index cc30dc8be7..20dea23206 100644
--- a/drivers/raw/ifpga/meson.build
+++ b/drivers/raw/ifpga/meson.build
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-if has_libfdt == 0
+if not has_libfdt
     build = false
     reason = 'missing dependency, "libfdt"'
     subdir_done()