Skip to content

transport: merge two nested if()s - #2057

Closed
vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:trspnestedif
Closed

vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:trspnestedif

Conversation

@vszakats

@vszakats vszakats commented Jun 15, 2026 •

Copy link
Copy Markdown
Member

Spotted by GitHub Code Quality

Follow-up to 3c953c0 #797

Spotted by GitHub Code Quality

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR performs a small refactor in ssh2_transport_send() to merge two nested if statements into a single conditional, as a follow-up to Code Quality findings related to the AES-GCM/PKTLEN_AAD block handling added in #797.

Changes:

  • Combine two nested if statements into one compound condition in the packet encryption loop.
  • Preserve existing behavior while simplifying control flow in the “combine final short block” logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vszakats vszakats changed the title transport: merge two nested if() transport: merge two nested if()s Jun 15, 2026
@vszakats vszakats closed this in eb300d5 Jun 15, 2026
@vszakats
vszakats deleted the trspnestedif branch June 15, 2026 18:22
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.

2 participants