Skip to content
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

more linting #174

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
remove useless mask
  • Loading branch information
fperrad committed Oct 28, 2022
commit b258c7f6fafea4ff7b53b08f394933bf9f819f3d
14 changes: 7 additions & 7 deletions include/mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,9 @@ enum MQTTConnectFlags {
MQTT_CONNECT_RESERVED = 1u,
MQTT_CONNECT_CLEAN_SESSION = 2u,
MQTT_CONNECT_WILL_FLAG = 4u,
MQTT_CONNECT_WILL_QOS_0 = (0u & 0x03) << 3,
MQTT_CONNECT_WILL_QOS_1 = (1u & 0x03) << 3,
MQTT_CONNECT_WILL_QOS_2 = (2u & 0x03) << 3,
MQTT_CONNECT_WILL_QOS_0 = 0u << 3,
MQTT_CONNECT_WILL_QOS_1 = 1u << 3,
MQTT_CONNECT_WILL_QOS_2 = 2u << 3,
MQTT_CONNECT_WILL_RETAIN = 32u,
MQTT_CONNECT_PASSWORD = 64u,
MQTT_CONNECT_USER_NAME = 128u
Expand Down Expand Up @@ -742,10 +742,10 @@ ssize_t mqtt_pack_connection_request(uint8_t* buf, size_t bufsz,
*/
enum MQTTPublishFlags {
MQTT_PUBLISH_DUP = 8u,
MQTT_PUBLISH_QOS_0 = ((0u << 1) & 0x06),
MQTT_PUBLISH_QOS_1 = ((1u << 1) & 0x06),
MQTT_PUBLISH_QOS_2 = ((2u << 1) & 0x06),
MQTT_PUBLISH_QOS_MASK = ((3u << 1) & 0x06),
MQTT_PUBLISH_QOS_0 = 0u << 1,
MQTT_PUBLISH_QOS_1 = 1u << 1,
MQTT_PUBLISH_QOS_2 = 2u << 1,
MQTT_PUBLISH_QOS_MASK = 3u << 1,
MQTT_PUBLISH_RETAIN = 0x01
};

Expand Down