netd: Enable clang-tidy and fix all warnings

Bug: 65246407
Test: m netd && system/netd/tests/runtests.sh
Change-Id: I1d22b2bc317fe7218ccde78859ed0623d6a1f8df
diff --git a/server/TrafficControllerTest.cpp b/server/TrafficControllerTest.cpp
index a354f83..43efc4e 100644
--- a/server/TrafficControllerTest.cpp
+++ b/server/TrafficControllerTest.cpp
@@ -128,7 +128,7 @@
     }
 
     int setUpSocketAndTag(int protocol, uint64_t* cookie, uint32_t tag, uid_t uid) {
-        int sock = socket(protocol, SOCK_STREAM, 0);
+        int sock = socket(protocol, SOCK_STREAM | SOCK_CLOEXEC, 0);
         EXPECT_LE(0, sock);
         *cookie = getSocketCookie(sock);
         EXPECT_NE(NONEXISTENT_COOKIE, *cookie);
@@ -293,7 +293,7 @@
 
     int invalidSocket = -1;
     ASSERT_GT(0, mTc.untagSocket(invalidSocket));
-    int v4socket = socket(AF_INET, SOCK_STREAM, 0);
+    int v4socket = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
     ASSERT_GT(0, mTc.untagSocket(v4socket));
     expectTagMapEmpty();
 }