Skip to content

Conversation

@Ryan-CW-Code
Copy link

Description

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

LogError( ( "Client ID length and value mismatch." ) );
status = MQTTBadParameter;
}
else if( ( pConnectInfo->clientIdentifierLength == 0U ) && ( pConnectInfo->cleanSession == false ) )
Copy link
Author

@Ryan-CW-Code Ryan-CW-Code Oct 24, 2025

Choose a reason for hiding this comment

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

The preceding if already ensures that when clientIdentifierLength is 0, pClientIdentifier must be either NULL or '\0'. Therefore, this if does not need to repeat those conditions. However, I am not sure whether this simplification might cause difficulties in reading and understanding.

@kstribrnAmzn
Copy link
Member

There are a couple failing checks which I'll address by overlaying a couple commits on top of your code.

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