The code was mistakenly assigning pointer to bool, make sure
we convert the return value to pointer first.

Fixes: 6d4c23a6ea44 ("controller: Add FDB support to MAC cache I-P node")
Signed-off-by: Ales Musil <[email protected]>
---
 controller/ovn-controller.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 874fe0cfa..e2793c883 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -3143,7 +3143,7 @@ mac_cache_mb_handle_for_datapath(struct mac_cache_data 
*data,
                                  const struct sbrec_datapath_binding *dp,
                                  struct ovsdb_idl_index *sbrec_mb_by_dp)
 {
-    bool has_threshold = mac_cache_threshold_find(data, dp->tunnel_key);
+    bool has_threshold = !!mac_cache_threshold_find(data, dp->tunnel_key);
 
     struct sbrec_mac_binding *mb_index_row =
             sbrec_mac_binding_index_init_row(sbrec_mb_by_dp);
@@ -3166,7 +3166,7 @@ mac_cache_fdb_handle_for_datapath(struct mac_cache_data 
*data,
                                   const struct sbrec_datapath_binding *dp,
                                   struct ovsdb_idl_index *sbrec_fdb_by_dp_key)
 {
-    bool has_threshold = mac_cache_threshold_find(data, dp->tunnel_key);
+    bool has_threshold = !!mac_cache_threshold_find(data, dp->tunnel_key);
 
     struct sbrec_fdb *fdb_index_row =
             sbrec_fdb_index_init_row(sbrec_fdb_by_dp_key);
-- 
2.51.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to