diff --git a/.clang-format b/.clang-format
index a74b62a..f5c9843 100644
--- a/.clang-format
+++ b/.clang-format
@@ -9,8 +9,7 @@
 CommentPragmas: NOLINT:.*
 DerivePointerAlignment: false
 IndentWidth: 4
-ContinuationIndentWidth: 8
+ContinuationIndentWidth: 4
 PointerAlignment: Left
-SpaceAfterCStyleCast: true
 TabWidth: 4
 UseTab: Never
diff --git a/Android.bp b/Android.bp
index 7d635d1..7aaacb1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13,7 +13,7 @@
         "android-*",
         "cert-*",
         "clang-analyzer-security*",
-	"-cert-err34-c",
+        "-cert-err34-c",
         "clang-analyzer-security*",
         // Disabling due to many unavoidable warnings from POSIX API usage.
         "-google-runtime-int",
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
index 3d3d4dd..128531e 100644
--- a/bpfloader/BpfLoader.cpp
+++ b/bpfloader/BpfLoader.cpp
@@ -67,14 +67,14 @@
 
 int main() {
     const std::vector<BpfMapInfo> mapPatterns = {
-            BpfMapInfo(COOKIE_TAG_MAP, COOKIE_TAG_MAP_PATH),
-            BpfMapInfo(UID_COUNTERSET_MAP, UID_COUNTERSET_MAP_PATH),
-            BpfMapInfo(APP_UID_STATS_MAP, APP_UID_STATS_MAP_PATH),
-            BpfMapInfo(UID_STATS_MAP, UID_STATS_MAP_PATH),
-            BpfMapInfo(TAG_STATS_MAP, TAG_STATS_MAP_PATH),
-            BpfMapInfo(IFACE_STATS_MAP, IFACE_STATS_MAP_PATH),
-            BpfMapInfo(CONFIGURATION_MAP, CONFIGURATION_MAP_PATH),
-            BpfMapInfo(UID_OWNER_MAP, UID_OWNER_MAP_PATH),
+        BpfMapInfo(COOKIE_TAG_MAP, COOKIE_TAG_MAP_PATH),
+        BpfMapInfo(UID_COUNTERSET_MAP, UID_COUNTERSET_MAP_PATH),
+        BpfMapInfo(APP_UID_STATS_MAP, APP_UID_STATS_MAP_PATH),
+        BpfMapInfo(UID_STATS_MAP, UID_STATS_MAP_PATH),
+        BpfMapInfo(TAG_STATS_MAP, TAG_STATS_MAP_PATH),
+        BpfMapInfo(IFACE_STATS_MAP, IFACE_STATS_MAP_PATH),
+        BpfMapInfo(CONFIGURATION_MAP, CONFIGURATION_MAP_PATH),
+        BpfMapInfo(UID_OWNER_MAP, UID_OWNER_MAP_PATH),
     };
     for (int i = 0; i < mapPatterns.size(); i++) {
         if (mapPatterns[i].fd < 0) {
@@ -83,18 +83,18 @@
         }
     }
     BpfProgInfo programs[] = {
-            {BPF_CGROUP_INET_EGRESS, BPF_EGRESS_PROG_PATH, BPF_CGROUP_EGRESS_PROG_NAME,
-             BPF_PROG_TYPE_CGROUP_SKB, unique_fd(-1)},
-            {BPF_CGROUP_INET_INGRESS, BPF_INGRESS_PROG_PATH, BPF_CGROUP_INGRESS_PROG_NAME,
-             BPF_PROG_TYPE_CGROUP_SKB, unique_fd(-1)},
-            {MAX_BPF_ATTACH_TYPE, XT_BPF_INGRESS_PROG_PATH, XT_BPF_INGRESS_PROG_NAME,
-             BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)},
-            {MAX_BPF_ATTACH_TYPE, XT_BPF_EGRESS_PROG_PATH, XT_BPF_EGRESS_PROG_NAME,
-             BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)},
-            {MAX_BPF_ATTACH_TYPE, XT_BPF_WHITELIST_PROG_PATH, XT_BPF_WHITELIST_PROG_NAME,
-             BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)},
-            {MAX_BPF_ATTACH_TYPE, XT_BPF_BLACKLIST_PROG_PATH, XT_BPF_BLACKLIST_PROG_NAME,
-             BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)}};
+        {BPF_CGROUP_INET_EGRESS, BPF_EGRESS_PROG_PATH, BPF_CGROUP_EGRESS_PROG_NAME,
+         BPF_PROG_TYPE_CGROUP_SKB, unique_fd(-1)},
+        {BPF_CGROUP_INET_INGRESS, BPF_INGRESS_PROG_PATH, BPF_CGROUP_INGRESS_PROG_NAME,
+         BPF_PROG_TYPE_CGROUP_SKB, unique_fd(-1)},
+        {MAX_BPF_ATTACH_TYPE, XT_BPF_INGRESS_PROG_PATH, XT_BPF_INGRESS_PROG_NAME,
+         BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)},
+        {MAX_BPF_ATTACH_TYPE, XT_BPF_EGRESS_PROG_PATH, XT_BPF_EGRESS_PROG_NAME,
+         BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)},
+        {MAX_BPF_ATTACH_TYPE, XT_BPF_WHITELIST_PROG_PATH, XT_BPF_WHITELIST_PROG_NAME,
+         BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)},
+        {MAX_BPF_ATTACH_TYPE, XT_BPF_BLACKLIST_PROG_PATH, XT_BPF_BLACKLIST_PROG_NAME,
+         BPF_PROG_TYPE_SOCKET_FILTER, unique_fd(-1)}};
     int ret = android::bpf::parseProgramsFromFile(BPF_PROG_SRC, programs, ARRAY_SIZE(programs),
                                                   mapPatterns);
     CLEANANDEXIT(ret, mapPatterns);
diff --git a/libbpf_android/BpfMapTest.cpp b/libbpf_android/BpfMapTest.cpp
index 02c7ee4..692442d 100644
--- a/libbpf_android/BpfMapTest.cpp
+++ b/libbpf_android/BpfMapTest.cpp
@@ -262,18 +262,18 @@
     expectMapEmpty(testMap);
     int entriesSeen = 0;
     EXPECT_OK(testMap.iterate(
-            [&entriesSeen](const unsigned int&,
-                           const BpfMap<unsigned int, unsigned int>&) -> netdutils::Status {
-                entriesSeen++;
-                return netdutils::status::ok;
-            }));
+        [&entriesSeen](const unsigned int&,
+                       const BpfMap<unsigned int, unsigned int>&) -> netdutils::Status {
+            entriesSeen++;
+            return netdutils::status::ok;
+        }));
     EXPECT_EQ(0, entriesSeen);
     EXPECT_OK(testMap.iterateWithValue(
-            [&entriesSeen](const unsigned int&, const unsigned int&,
-                           const BpfMap<unsigned int, unsigned int>&) -> netdutils::Status {
-                entriesSeen++;
-                return netdutils::status::ok;
-            }));
+        [&entriesSeen](const unsigned int&, const unsigned int&,
+                       const BpfMap<unsigned int, unsigned int>&) -> netdutils::Status {
+            entriesSeen++;
+            return netdutils::status::ok;
+        }));
     EXPECT_EQ(0, entriesSeen);
 }
 
diff --git a/libbpf_android/BpfUtils.cpp b/libbpf_android/BpfUtils.cpp
index 4d4cae3..f6b0135 100644
--- a/libbpf_android/BpfUtils.cpp
+++ b/libbpf_android/BpfUtils.cpp
@@ -226,8 +226,8 @@
     }
     char dummy;
     ret = sscanf(buf.release, "%d.%d%c", &kernel_version_major, &kernel_version_minor, &dummy);
-    if (ret >= 2 && ((kernel_version_major > 4) ||
-                         (kernel_version_major == 4 && kernel_version_minor >= 9))) {
+    if (ret >= 2 &&
+        ((kernel_version_major > 4) || (kernel_version_major == 4 && kernel_version_minor >= 9))) {
         // Check if the device is shipped originally with android P.
         return api_level >= MINIMUM_API_REQUIRED;
     }
@@ -271,7 +271,7 @@
 
 int extractAndLoadProg(BpfProgInfo* prog, Elf64_Shdr* sectionPtr, Slice fileContents,
                        const std::vector<BpfMapInfo>& mapPatterns) {
-    uint64_t progSize = (uint64_t) sectionPtr->sh_size;
+    uint64_t progSize = (uint64_t)sectionPtr->sh_size;
     Slice progSection = take(drop(fileContents, sectionPtr->sh_offset), progSize);
     if (progSection.size() < progSize) {
         ALOGE("programSection out of bound");
@@ -314,7 +314,7 @@
         return -EINVAL;
     }
 
-    Elf64_Ehdr* elf = (Elf64_Ehdr*) elfHeader.base();
+    Elf64_Ehdr* elf = (Elf64_Ehdr*)elfHeader.base();
     // Find section names string table. This is the section whose index is e_shstrndx.
     if (elf->e_shstrndx == SHN_UNDEF) {
         ALOGE("cannot locate namesSection\n");
@@ -328,13 +328,13 @@
     }
 
     Slice namesSection =
-            take(drop(sections, elf->e_shstrndx * sizeof(Elf64_Shdr)), sizeof(Elf64_Shdr));
+        take(drop(sections, elf->e_shstrndx * sizeof(Elf64_Shdr)), sizeof(Elf64_Shdr));
     if (namesSection.size() != sizeof(Elf64_Shdr)) {
         ALOGE("namesSection corrupted");
         return -EMSGSIZE;
     }
-    size_t strTabOffset = ((Elf64_Shdr*) namesSection.base())->sh_offset;
-    size_t strTabSize = ((Elf64_Shdr*) namesSection.base())->sh_size;
+    size_t strTabOffset = ((Elf64_Shdr*)namesSection.base())->sh_offset;
+    size_t strTabSize = ((Elf64_Shdr*)namesSection.base())->sh_size;
 
     Slice strTab = take(drop(fileContents, strTabOffset), strTabSize);
     if (strTab.size() < strTabSize) {
@@ -350,7 +350,7 @@
                   i, section.size(), sizeof(Elf64_Shdr), sections.size());
             return -EBADF;
         }
-        Elf64_Shdr* sectionPtr = (Elf64_Shdr*) section.base();
+        Elf64_Shdr* sectionPtr = (Elf64_Shdr*)section.base();
         Slice nameSlice = drop(strTab, sectionPtr->sh_name);
         if (nameSlice.size() == 0) {
             ALOGE("nameSlice out of bound, i: %d, strTabSize: %zu, sh_name: %u", i, strTabSize,
@@ -359,7 +359,7 @@
         }
         for (size_t i = 0; i < size; i++) {
             BpfProgInfo* prog = programs + i;
-            if (!strcmp((char*) nameSlice.base(), prog->name)) {
+            if (!strcmp((char*)nameSlice.base(), prog->name)) {
                 int ret = extractAndLoadProg(prog, sectionPtr, fileContents, mapPatterns);
                 if (ret) return ret;
             }
@@ -395,8 +395,7 @@
     }
 
     off_t fileLen = stat.st_size;
-    char* baseAddr =
-            (char*) mmap(NULL, fileLen, PROT_READ, MAP_PRIVATE | MAP_POPULATE, fd.get(), 0);
+    char* baseAddr = (char*)mmap(NULL, fileLen, PROT_READ, MAP_PRIVATE | MAP_POPULATE, fd.get(), 0);
     if (baseAddr == MAP_FAILED) {
         ALOGE("Failed to map the program (%s) into memory: %s", path, strerror(errno));
         ret = -errno;
diff --git a/libbpf_android/include/bpf/BpfUtils.h b/libbpf_android/include/bpf/BpfUtils.h
index ed31758..afebb4a 100644
--- a/libbpf_android/include/bpf/BpfUtils.h
+++ b/libbpf_android/include/bpf/BpfUtils.h
@@ -116,8 +116,8 @@
         : BpfMapInfo(dummyFd, android::bpf::mapRetrieve(mapPath, 0)) {}
 
     BpfMapInfo(uint64_t dummyFd, int realFd, const char* mapPath = "") : fd(realFd), path(mapPath) {
-        search = BPF_MAP_SEARCH_PATTERN((uint8_t*) &dummyFd);
-        replace = BPF_MAP_REPLACE_PATTERN((uint8_t*) &realFd);
+        search = BPF_MAP_SEARCH_PATTERN((uint8_t*)&dummyFd);
+        replace = BPF_MAP_REPLACE_PATTERN((uint8_t*)&realFd);
     }
 };
 
@@ -133,8 +133,8 @@
 
 constexpr const int MINIMUM_API_REQUIRED = 28;
 
-int createMap(bpf_map_type map_type, uint32_t key_size, uint32_t value_size,
-              uint32_t max_entries, uint32_t map_flags);
+int createMap(bpf_map_type map_type, uint32_t key_size, uint32_t value_size, uint32_t max_entries,
+              uint32_t map_flags);
 int writeToMapEntry(const base::unique_fd& map_fd, void* key, void* value, uint64_t flags);
 int findMapEntry(const base::unique_fd& map_fd, void* key, void* value);
 int deleteMapEntry(const base::unique_fd& map_fd, void* key);
