Skip to content

Commit 61577bf

Browse files
committed
Null to nullptr to appease linter
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
1 parent e270de3 commit 61577bf

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/LoggerBase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ void Logger::publishDataQueuedToRemotes(bool internetPresent) {
18651865
#endif // MS_LOGGERBASE_POSTS
18661866

18671867
for (uint8_t i = 0; i < MAX_NUMBER_SENDERS; i++) {
1868-
if (dataPublishers[i] != NULL) {
1868+
if (dataPublishers[i] != nullptr) {
18691869
_dataPubInstance = i;
18701870
PRINTOUT(F("\npubDQTR Sending data to ["), i, F("]"),
18711871
dataPublishers[i]->getEndpoint());
@@ -2010,7 +2010,7 @@ void Logger::publishDataQueuedToRemotes(bool internetPresent) {
20102010
// Check for enough battery power
20112011
if (cnt_for_pwr_analysis++ >=
20122012
_sendAtOneTimeMaxX_num) {
2013-
if (NULL != _bat_handler_atl) {
2013+
if (nullptr != _bat_handler_atl) {
20142014
// Measure battery
20152015
_bat_handler_atl(LB_PWR_USEABLE_REQ);
20162016
if (!_bat_handler_atl(

src/modems/DigiXBeeCellularTransparent.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ class DigiXBeeCellularTransparent : public DigiXBee {
151151
DigiXBeeCellularTransparent(Stream* modemStream, int8_t powerPin,
152152
int8_t statusPin, bool useCTSStatus,
153153
int8_t modemResetPin, int8_t modemSleepRqPin,
154-
const char* apn, const char* user = NULL,
155-
const char* pwd = NULL);
154+
const char* apn, const char* user = nullptr,
155+
const char* pwd = nullptr);
156156
/**
157157
* @brief Destroy the Digi XBee Cellular Transparent object - no action
158158
* needed

src/modems/DigiXBeeWifi.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,12 +591,12 @@ void DigiXBeeWifi::setWiFiId(const char* newSsid, bool copyId) {
591591
WiFiId2[newSsid_sz] = 0; // Trim max size
592592
newSsid_sz = WIFI_SSID_MAX_sz;
593593
}
594-
if (NULL == _ssid_buf) {
594+
if (nullptr == _ssid_buf) {
595595
_ssid_buf = new char[newSsid_sz + 2]; // Allow for trailing 0
596596
} else {
597597
PRINTOUT(F("\nLoggerModem::setWiFiId error - expected NULL ptr"));
598598
}
599-
if (NULL == _ssid_buf) {
599+
if (nullptr == _ssid_buf) {
600600
// Major problem
601601
PRINTOUT(F("\nLoggerModem::setWiFiId error -no buffer "),
602602
_ssid_buf);
@@ -625,12 +625,12 @@ void DigiXBeeWifi::setWiFiPwd(const char* newPwd, bool copyId) {
625625
pwd2[newPwd_sz] = 0; // Trim max size
626626
newPwd_sz = WIFI_PWD_MAX_sz;
627627
}
628-
if (NULL == _pwd_buf) {
628+
if (nullptr == _pwd_buf) {
629629
_pwd_buf = new char[newPwd_sz + 2]; // Allow for trailing 0
630630
} else {
631631
PRINTOUT(F("\nLoggerModem::setWiFiPwd error - expected NULL ptr"));
632632
}
633-
if (NULL == _pwd_buf) {
633+
if (nullptr == _pwd_buf) {
634634
// Major problem
635635
PRINTOUT(F("\nLoggerModem::setWiFiPwd error -no buffer "),
636636
_pwd_buf);

src/modems/DigiXBeeWifi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ class DigiXBeeWifi : public DigiXBee {
176176
bool _maintainAssociation;
177177

178178
// Access Management
179-
char* _ssid_buf = NULL;
180-
char* _pwd_buf = NULL;
179+
char* _ssid_buf = nullptr;
180+
char* _pwd_buf = nullptr;
181181

182182
uint16_t updateModemMetadata_cnt = 0;
183183
// This causes the Xbee to reset after this number of transmission attempts

src/publishers/EnviroDIYPublisher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const char* EnviroDIYPublisher::timestampTag = "\",\"timestamp\":\"";
3232
// Constructors
3333
EnviroDIYPublisher::EnviroDIYPublisher() : dataPublisher() {
3434
// MS_DBG(F("dataPublisher object created"));
35-
_registrationToken = NULL;
35+
_registrationToken = nullptr;
3636
setDIYHost(enviroDIYHost);
3737
setTimerPostTimeout_mS(TIMER_EDP_POST_TIMEOUT_DEF_MSEC);
3838
setTimerPostPacing_mS(TIMER_EDP_POSTED_PACING_DEF_MSEC);

0 commit comments

Comments
 (0)