vold: cleanups for O_CLOEXEC tidy checks.
Bug: 129350825
Test: compiles and boots
Change-Id: I83a484ca15df1b757b670008f15af5504bc94df1
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 51eec8a..897c2a8 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -500,7 +500,8 @@
}
// We purposefully leave the namespace open across the fork
- nsFd = openat(pidFd, "ns/mnt", O_RDONLY); // not O_CLOEXEC
+ // NOLINTNEXTLINE(android-cloexec-open): Deliberately not O_CLOEXEC
+ nsFd = openat(pidFd, "ns/mnt", O_RDONLY);
if (nsFd < 0) {
PLOG(WARNING) << "Failed to open namespace for " << de->d_name;
goto next;