Skip to content

Comment typos and minor cleanups in wslcsession and lxtfs#40498

Merged
benhillis merged 1 commit into
microsoft:masterfrom
benhillis:user/benhill/cleanup-comment-typos-and-style
May 11, 2026
Merged

Comment typos and minor cleanups in wslcsession and lxtfs#40498
benhillis merged 1 commit into
microsoft:masterfrom
benhillis:user/benhill/cleanup-comment-typos-and-style

Conversation

@benhillis
Copy link
Copy Markdown
Member

Split out from #40489. Cleanup-only changes (no functional effect) bundled together for ease of review.

Comment typos

  • src/windows/wslcsession/WSLCContainer.cpp:
    • "Passed this point" -> "Past this point"
    • "can be bind" -> "can bind"
  • test/linux/unit_tests/lxtfs.c:
    • "afer 1980" -> "after 1980"
    • "Supplies a pa value" -> "Supplies a value"

WSLCSession.cpp minor cleanups

  • Move the dockerd-ready log marker (c_dockerdReadyLogLine) to a file-scope constexpr auto alongside the other socket/path constants, instead of redeclaring it inside OnProcessLog (called once per log line).
  • Drop redundant explicit template arguments from std::accumulate in ListImages and switch the init value to size_t{0} so the accumulator type is explicit and matches the consumer.

Notes / changes from the original bundled PR

Two changes from #40489 were intentionally dropped:

  • The IndentLines rewrite (index loop -> iterators with std::next) — the original index loop is at least as readable.
  • The waitForStop rename in WSLCContainerImpl::Stop — the original one-liner is already clear, the introduced isKillSignal / shouldWaitWhenKill pair adds noise without changing meaning.
  • The c_logId change from static constexpr char[] to constexpr auto was also dropped because it changes the variable's type from const char (&)[N] to const char * rather than being purely cosmetic.

* 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: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 11, 2026 17:45
@benhillis benhillis marked this pull request as ready for review May 11, 2026 17:47
@benhillis benhillis requested a review from a team as a code owner May 11, 2026 17:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Cleanup-only PR that fixes comment typos and performs small, non-functional code cleanups in WSLCSession for readability and minor efficiency.

Changes:

  • Corrected several comment typos in WSLCContainer.cpp and lxtfs.c.
  • Moved the dockerd-ready log marker string to file-scope constexpr in WSLCSession.cpp.
  • Simplified std::accumulate usage in WSLCSession.cpp and made the accumulator type explicit with size_t{0}.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
test/linux/unit_tests/lxtfs.c Comment typo fixes in test documentation blocks.
src/windows/wslcsession/WSLCSession.cpp File-scope constexpr for log marker; simplified std::accumulate call.
src/windows/wslcsession/WSLCContainer.cpp Comment wording fixes related to locking and port binding.

@benhillis benhillis merged commit 6e41b01 into microsoft:master May 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants