Comment typos and minor cleanups in wslcsession and lxtfs (#40498)

* WSLCContainer.cpp comment fixes: - "Passed this point" -> "Past this point" - "can be bind" -> "can bind" * lxtfs.c comment fixes: - "afer 1980" -> "after 1980" - "Supplies a pa value" -> "Supplies a value" * WSLCSession.cpp: - Move the dockerd-ready log marker to a file-scope constexpr alongside the other socket/path constants instead of redeclaring it on every log line in OnProcessLog. - Drop the redundant explicit template arguments from std::accumulate in ListImages and use a typed init value (size_t{0}). Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Ben Hillis committed May 11, 2026 at 12:46 UTC 6e41b013d272df3ddb4705d1b462f26127635640
3 files changed +6 -7
src/windows/wslcsession/WSLCContainer.cpp
+2 -2
@@ -978,7 +978,7 @@ void WSLCContainerImpl::Export(WSLCHandle OutHandle) const
978 }
979
980 // Release the lock so the container can still be interacted with while the export is in progress.
981 - // Passed this point, no member variables can be accessed.
981 + // Past this point, no member variables can be accessed.
982 lock.reset();
983
984 io.Run({});
@@ -1795,7 +1795,7 @@ void WSLCContainerImpl::MapPorts()
1795 if (!e.VmMapping.VmPort)
1796 {
1797 // Reuse existing vm port allocation when possible.
1798 - // This is required because the same container can be bind the port number for different families or protocols.
1798 + // This is required because the same container can bind the port number for different families or protocols.
1799 auto existing = allocatedPorts.find(e.ContainerPort);
1800 if (existing != allocatedPorts.end())
1801 {
src/windows/wslcsession/WSLCSession.cpp
+2 -3
@@ -29,6 +29,7 @@ using wsl::windows::service::wslc::WSLCVirtualMachine;
29
30 constexpr auto c_containerdStorage = "/var/lib/docker";
31 constexpr auto c_containerdSocket = "/run/containerd/containerd.sock";
32 +constexpr auto c_dockerdReadyLogLine = "API listen on /var/run/docker.sock";
33 constexpr DWORD c_processTerminateTimeoutMs = 30 * 1000;
34 constexpr DWORD c_processKillTimeoutMs = 10 * 1000;
35
@@ -423,8 +424,6 @@ try
424 return;
425 }
426
426 - constexpr auto c_dockerdReadyLogLine = "API listen on /var/run/docker.sock";
427 -
427 std::string entry = {Buffer.begin(), Buffer.end()};
428 WSL_LOG(
429 "ContainerdLog",
@@ -1223,7 +1222,7 @@ try
1222 CATCH_AND_THROW_DOCKER_USER_ERROR("Failed to list images");
1223
1224 // Compute the number of entries - one entry per tag, or one per image if no tags
1226 - auto entries = std::accumulate<decltype(images.begin()), size_t>(images.begin(), images.end(), 0, [](auto sum, const auto& e) {
1225 + auto entries = std::accumulate(images.begin(), images.end(), size_t{0}, [](auto sum, const auto& e) {
1226 return sum + (e.RepoTags.empty() ? 1 : e.RepoTags.size());
1227 });
1228
test/linux/unit_tests/lxtfs.c
+2 -2
@@ -149,7 +149,7 @@ void LxtFsUtimeRoundToNt(struct timespec* Timespec);
149
150 //
151 // All real timestamps are offset from the year 2000 because FAT can only
152 -// accept timestamps afer 1980.
152 +// accept timestamps after 1980.
153
154 BASIC_TEST_CASE BasicTestCases[] = {
155 {{{FS_UNIX_TIME_2000 + 1111111, 2222222}, {FS_UNIX_TIME_2000 + 3333333, 4444444}},
@@ -2056,7 +2056,7 @@ Arguments:
2056 DrvFsDir - Supplies the DrvFs directory to use for testing. This must
2057 start with a slash, and be relative from the root of the DrvFs mount.
2058
2059 - UseDrvFs - Supplies a pa value indicating whether DrvFs is being used.
2059 + UseDrvFs - Supplies a value indicating whether DrvFs is being used.
2060
2061 Return Value:
2062