From 5b8a1fc2a788f434476450e6565373408cb46cc3 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 25 Oct 2020 21:41:14 -0700 Subject: [PATCH] Minor renames --- native/jni/core/module.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/native/jni/core/module.cpp b/native/jni/core/module.cpp index f8273d083..f48024fe7 100644 --- a/native/jni/core/module.cpp +++ b/native/jni/core/module.cpp @@ -643,7 +643,7 @@ static void prepare_modules() { } template -static void foreach_modules(Func fn) { +static void foreach_module(Func fn) { auto dir = open_dir(MODULEROOT); if (!dir) return; @@ -659,7 +659,7 @@ static void foreach_modules(Func fn) { } static void collect_modules() { - foreach_modules([](int dfd, dirent *entry, int modfd) { + foreach_module([](int dfd, dirent *entry, int modfd) { if (faccessat(modfd, "remove", F_OK, 0) == 0) { LOGI("%s: remove\n", entry->d_name); auto uninstaller = MODULEROOT + "/"s + entry->d_name + "/uninstall.sh"; @@ -686,13 +686,13 @@ void handle_modules() { } void disable_modules() { - foreach_modules([](auto, auto, int modfd) { + foreach_module([](int, auto, int modfd) { close(xopenat(modfd, "disable", O_RDONLY | O_CREAT | O_CLOEXEC, 0)); }); } void remove_modules() { - foreach_modules([](int dfd, dirent *entry, int modfd) { + foreach_module([](int, dirent *entry, int) { auto uninstaller = MODULEROOT + "/"s + entry->d_name + "/uninstall.sh"; if (access(uninstaller.data(), F_OK) == 0) exec_script(uninstaller.data());