Skip to content

Commit 986c1b4

Browse files
committed
fix c formatting
1 parent 4cb40f8 commit 986c1b4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Adafruit_MQTT.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -510,27 +510,27 @@ void Adafruit_MQTT::processPackets(int16_t timeout) {
510510
Adafruit_MQTT_Subscribe *Adafruit_MQTT::readSubscription(int16_t timeout) {
511511

512512
// Sync or Async subscriber with message
513-
Adafruit_MQTT_Subscribe* s=0;
513+
Adafruit_MQTT_Subscribe *s=0;
514514

515515
// Check if are unread messages
516516
for (uint8_t i = 0; i < MAXSUBSCRIPTIONS; i++) {
517517
if (subscriptions[i] && subscriptions[i]->new_message) {
518-
s=subscriptions[i];
518+
s = subscriptions[i];
519519
break;
520520
}
521521
}
522522

523523
// not unread message
524-
if ( ! s ) {
524+
if (!s) {
525525
// Check if data is available to read.
526-
uint16_t len =
527-
readFullPacket(buffer, MAXBUFFERSIZE, timeout); // return one full packet
528-
s=handleSubscriptionPacket(len);
526+
uint16_t len = readFullPacket(buffer, MAXBUFFERSIZE,
527+
timeout); // return one full packet
528+
s = handleSubscriptionPacket(len);
529529
}
530530

531531
// it there is a message, mark it as not pending
532-
if ( s ) {
533-
s->new_message=false;
532+
if (s) {
533+
s->new_message = false;
534534
}
535535

536536
return s;
@@ -573,12 +573,12 @@ Adafruit_MQTT_Subscribe *Adafruit_MQTT::handleSubscriptionPacket(uint16_t len) {
573573
topiclen) == 0) {
574574
DEBUG_PRINT(F("Found sub #"));
575575
DEBUG_PRINTLN(i);
576-
if ( subscriptions[i]->new_message ) {
576+
if (subscriptions[i]->new_message) {
577577
DEBUG_PRINTLN(F("Lost previous message"));
578578
} else {
579-
subscriptions[i]->new_message=true;
579+
subscriptions[i]->new_message = true;
580580
}
581-
581+
582582
break;
583583
}
584584
}

0 commit comments

Comments
 (0)