Fixing compiler warnings exposed with -Wall and -Wextra: qos can't be less than zero. (#274)
This commit is contained in:
parent
bb101c58e8
commit
f029640ee6
@ -468,7 +468,7 @@ boolean PubSubClient::subscribe(const char* topic) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean PubSubClient::subscribe(const char* topic, uint8_t qos) {
|
boolean PubSubClient::subscribe(const char* topic, uint8_t qos) {
|
||||||
if (qos < 0 || qos > 1) {
|
if (qos > 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (MQTT_MAX_PACKET_SIZE < 9 + strlen(topic)) {
|
if (MQTT_MAX_PACKET_SIZE < 9 + strlen(topic)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user