Skip to content

samples: net: secure_mqtt_sensor_actuator: replace error code with enum val #89121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lorl0rd
Copy link

@Lorl0rd Lorl0rd commented Apr 25, 2025

The error code 0x80 is replaced with its corresponding mqtt_suback_return_code enum value (see enum definition for verification. This seems to make the code more readable, as users of this example do not have to look up, what 0x80 encodes.

…um value

The error code `0x80` is replaced with its corresponding `mqtt_suback_return_code` enum value (see [enum definition](https://github.com/zephyrproject-rtos/zephyr/blob/f412cc643d91660b7acffacdbb6e18b100fccf7c/include/zephyr/net/mqtt.h#L180) for verification. This seems to make the code more readable, as users of this example do not have to look up, what `0x80` encodes.

Signed-off-by: Pályi Lőrinc <palyilorinc33@gmail.com>
@github-actions github-actions bot added size: XS A PR changing only a single line of code area: Samples Samples labels Apr 25, 2025
Copy link

Hello @Lorl0rd, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@kartben kartben added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking area: Samples Samples size: XS A PR changing only a single line of code Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants