Enable clang-tidy for clatd.
Enable the same warnings used elsewhere in the tree, and fix two
warnings it found (a safe use of strcpy, and a missing O_CLOEXEC
when opening the tun device node.
Test: builds, boots, clatd works
Test: m clatd clatd_test clatd_microbenchmark && atest clatd_test
Change-Id: I9a5ea4de5f31d3c495871250a6493b07535a604b
diff --git a/clatd_microbenchmark.c b/clatd_microbenchmark.c
index 91b0996..15a0376 100644
--- a/clatd_microbenchmark.c
+++ b/clatd_microbenchmark.c
@@ -67,7 +67,7 @@
if (fd == -1) die("tun_open");
char dev[IFNAMSIZ] = DEVICENAME;
- int ret = tun_alloc(dev, fd);
+ int ret = tun_alloc(dev, fd, sizeof(dev));
if (ret == -1) die("tun_alloc");
struct ifreq ifr = {
.ifr_name = DEVICENAME,