From f92b37e7dadd552f0dac5bfa4eaca325b256608e Mon Sep 17 00:00:00 2001 From: yzhao Date: Sat, 18 Dec 2021 10:17:46 -0800 Subject: [PATCH] Replace !StatusTuple::code() with StatusTuple::ok() in src/cc/api/BPFTable.h (#3751) Replace !StatusTuple::code() with StatusTuple::ok() in src/cc/api/BPFTable.h --- src/cc/api/BPFTable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc/api/BPFTable.h b/src/cc/api/BPFTable.h index b75302c3..ca04cd1f 100644 --- a/src/cc/api/BPFTable.h +++ b/src/cc/api/BPFTable.h @@ -48,7 +48,7 @@ class BPFQueueStackTableBase { StatusTuple leaf_to_string(const ValueType* value, std::string& value_str) { char buf[8 * desc.leaf_size]; StatusTuple rc = desc.leaf_snprintf(buf, sizeof(buf), value); - if (!rc.code()) + if (rc.ok()) value_str.assign(buf); return rc; } @@ -90,7 +90,7 @@ class BPFTableBase { StatusTuple key_to_string(const KeyType* key, std::string& key_str) { char buf[8 * desc.key_size]; StatusTuple rc = desc.key_snprintf(buf, sizeof(buf), key); - if (!rc.code()) + if (rc.ok()) key_str.assign(buf); return rc; } @@ -98,7 +98,7 @@ class BPFTableBase { StatusTuple leaf_to_string(const ValueType* value, std::string& value_str) { char buf[8 * desc.leaf_size]; StatusTuple rc = desc.leaf_snprintf(buf, sizeof(buf), value); - if (!rc.code()) + if (rc.ok()) value_str.assign(buf); return rc; } -- 2.34.1