Loading base/include/android-base/logging.h +1 −1 Original line number Diff line number Diff line Loading @@ -469,7 +469,7 @@ class ScopedLogSeverity { } // namespace base } // namespace android namespace std { namespace std { // NOLINT(cert-dcl58-cpp) // Emit a warning of ostream<< with std::string*. The intention was most likely to print *string. // Loading fs_mgr/libdm/include/libdm/dm.h +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ #define DM_VERSION2 (0) #define DM_ALIGN_MASK (7) #define DM_ALIGN(x) ((x + DM_ALIGN_MASK) & ~DM_ALIGN_MASK) #define DM_ALIGN(x) (((x) + DM_ALIGN_MASK) & ~DM_ALIGN_MASK) namespace android { namespace dm { Loading init/action_manager.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,8 @@ void ActionManager::ExecuteOneCommand() { current_command_ = 0; if (action->oneshot()) { auto eraser = [&action](std::unique_ptr<Action>& a) { return a.get() == action; }; actions_.erase(std::remove_if(actions_.begin(), actions_.end(), eraser)); actions_.erase(std::remove_if(actions_.begin(), actions_.end(), eraser), actions_.end()); } } } Loading init/builtins.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ static Result<void> do_ifup(const BuiltinArguments& args) { strlcpy(ifr.ifr_name, args[1].c_str(), IFNAMSIZ); unique_fd s(TEMP_FAILURE_RETRY(socket(AF_INET, SOCK_DGRAM, 0))); unique_fd s(TEMP_FAILURE_RETRY(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0))); if (s < 0) return ErrnoError() << "opening socket failed"; if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) { Loading Loading @@ -784,7 +784,7 @@ static Result<void> do_write(const BuiltinArguments& args) { } static Result<void> readahead_file(const std::string& filename, bool fully) { android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY))); android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY | O_CLOEXEC))); if (fd == -1) { return ErrnoError() << "Error opening file"; } Loading init/first_stage_init.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ void FreeRamdisk(DIR* dir, dev_t dev) { if (S_ISDIR(info.st_mode)) { is_dir = true; auto fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY); auto fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY | O_CLOEXEC); if (fd >= 0) { auto subdir = std::unique_ptr<DIR, decltype(&closedir)>{fdopendir(fd), closedir}; Loading Loading @@ -152,7 +152,7 @@ int FirstStageMain(int argc, char** argv) { std::vector<std::pair<std::string, int>> errors; #define CHECKCALL(x) \ if (x != 0) errors.emplace_back(#x " failed", errno); if ((x) != 0) errors.emplace_back(#x " failed", errno); // Clear the umask. umask(0); Loading Loading
base/include/android-base/logging.h +1 −1 Original line number Diff line number Diff line Loading @@ -469,7 +469,7 @@ class ScopedLogSeverity { } // namespace base } // namespace android namespace std { namespace std { // NOLINT(cert-dcl58-cpp) // Emit a warning of ostream<< with std::string*. The intention was most likely to print *string. // Loading
fs_mgr/libdm/include/libdm/dm.h +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ #define DM_VERSION2 (0) #define DM_ALIGN_MASK (7) #define DM_ALIGN(x) ((x + DM_ALIGN_MASK) & ~DM_ALIGN_MASK) #define DM_ALIGN(x) (((x) + DM_ALIGN_MASK) & ~DM_ALIGN_MASK) namespace android { namespace dm { Loading
init/action_manager.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,8 @@ void ActionManager::ExecuteOneCommand() { current_command_ = 0; if (action->oneshot()) { auto eraser = [&action](std::unique_ptr<Action>& a) { return a.get() == action; }; actions_.erase(std::remove_if(actions_.begin(), actions_.end(), eraser)); actions_.erase(std::remove_if(actions_.begin(), actions_.end(), eraser), actions_.end()); } } } Loading
init/builtins.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ static Result<void> do_ifup(const BuiltinArguments& args) { strlcpy(ifr.ifr_name, args[1].c_str(), IFNAMSIZ); unique_fd s(TEMP_FAILURE_RETRY(socket(AF_INET, SOCK_DGRAM, 0))); unique_fd s(TEMP_FAILURE_RETRY(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0))); if (s < 0) return ErrnoError() << "opening socket failed"; if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) { Loading Loading @@ -784,7 +784,7 @@ static Result<void> do_write(const BuiltinArguments& args) { } static Result<void> readahead_file(const std::string& filename, bool fully) { android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY))); android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY | O_CLOEXEC))); if (fd == -1) { return ErrnoError() << "Error opening file"; } Loading
init/first_stage_init.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ void FreeRamdisk(DIR* dir, dev_t dev) { if (S_ISDIR(info.st_mode)) { is_dir = true; auto fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY); auto fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY | O_CLOEXEC); if (fd >= 0) { auto subdir = std::unique_ptr<DIR, decltype(&closedir)>{fdopendir(fd), closedir}; Loading Loading @@ -152,7 +152,7 @@ int FirstStageMain(int argc, char** argv) { std::vector<std::pair<std::string, int>> errors; #define CHECKCALL(x) \ if (x != 0) errors.emplace_back(#x " failed", errno); if ((x) != 0) errors.emplace_back(#x " failed", errno); // Clear the umask. umask(0); Loading