Convert system/bpf to Result::ok()

No functionality changes, this is a mechanical cleanup.

Test: m
Change-Id: Ia37f81c9861be0da83a91663a9d32b6b753a527c
diff --git a/libbpf_android/include/bpf/BpfMap.h b/libbpf_android/include/bpf/BpfMap.h
index 243d9dc..60f114f 100644
--- a/libbpf_android/include/bpf/BpfMap.h
+++ b/libbpf_android/include/bpf/BpfMap.h
@@ -146,7 +146,7 @@
         const auto deleteAllEntries = [](const Key& key,
                                          BpfMap<Key, Value>& map) -> base::Result<void> {
             base::Result<void> res = map.deleteValue(key);
-            if (!res && res.error().code() != ENOENT) {
+            if (!res.ok() && res.error().code() != ENOENT) {
                 ALOGE("Failed to delete data %s", strerror(res.error().code()));
             }
             return {};
@@ -182,10 +182,10 @@
         const std::function<base::Result<void>(const Key& key, const BpfMap<Key, Value>& map)>&
                 filter) const {
     base::Result<Key> curKey = getFirstKey();
-    while (curKey) {
+    while (curKey.ok()) {
         const base::Result<Key>& nextKey = getNextKey(curKey.value());
         base::Result<void> status = filter(curKey.value(), *this);
-        if (!status) return status;
+        if (!status.ok()) return status;
         curKey = nextKey;
     }
     if (curKey.error().code() == ENOENT) return {};
@@ -197,12 +197,12 @@
         const std::function<base::Result<void>(const Key& key, const Value& value,
                                                const BpfMap<Key, Value>& map)>& filter) const {
     base::Result<Key> curKey = getFirstKey();
-    while (curKey) {
+    while (curKey.ok()) {
         const base::Result<Key>& nextKey = getNextKey(curKey.value());
         base::Result<Value> curValue = this->readValue(curKey.value());
-        if (!curValue) return curValue.error();
+        if (!curValue.ok()) return curValue.error();
         base::Result<void> status = filter(curKey.value(), curValue.value(), *this);
-        if (!status) return status;
+        if (!status.ok()) return status;
         curKey = nextKey;
     }
     if (curKey.error().code() == ENOENT) return {};
@@ -213,10 +213,10 @@
 base::Result<void> BpfMap<Key, Value>::iterate(
         const std::function<base::Result<void>(const Key& key, BpfMap<Key, Value>& map)>& filter) {
     base::Result<Key> curKey = getFirstKey();
-    while (curKey) {
+    while (curKey.ok()) {
         const base::Result<Key>& nextKey = getNextKey(curKey.value());
         base::Result<void> status = filter(curKey.value(), *this);
-        if (!status) return status;
+        if (!status.ok()) return status;
         curKey = nextKey;
     }
     if (curKey.error().code() == ENOENT) return {};
@@ -228,12 +228,12 @@
         const std::function<base::Result<void>(const Key& key, const Value& value,
                                                BpfMap<Key, Value>& map)>& filter) {
     base::Result<Key> curKey = getFirstKey();
-    while (curKey) {
+    while (curKey.ok()) {
         const base::Result<Key>& nextKey = getNextKey(curKey.value());
         base::Result<Value> curValue = this->readValue(curKey.value());
-        if (!curValue) return curValue.error();
+        if (!curValue.ok()) return curValue.error();
         base::Result<void> status = filter(curKey.value(), curValue.value(), *this);
-        if (!status) return status;
+        if (!status.ok()) return status;
         curKey = nextKey;
     }
     if (curKey.error().code() == ENOENT) return {};