Replace !StatusTuple::code() with StatusTuple::ok() in src/cc/api/BPFTable.h (#3751)
authoryzhao <yzhao@pixielabs.ai>
Sat, 18 Dec 2021 18:17:46 +0000 (10:17 -0800)
committerGitHub <noreply@github.com>
Sat, 18 Dec 2021 18:17:46 +0000 (10:17 -0800)
Replace !StatusTuple::code() with StatusTuple::ok() in src/cc/api/BPFTable.h

src/cc/api/BPFTable.h

index b75302c35b898cab229b4dc507445def18f8780a..ca04cd1f325fba2d3ede2484b446ce8a988e7d30 100644 (file)
@@ -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;
   }