Skip to content

Commit

Permalink
Use nullptr for pointers instead of constant 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmair committed Feb 13, 2023
1 parent 137e01e commit 6095603
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion logging/log/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static char * number(char * buf, char * end, long num, int base, int size,
type &= ~ZEROPAD;
// we only allow a base between 8 and 16
if (base < 8 || base > 16)
return 0;
return nullptr;
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
Expand Down
2 changes: 1 addition & 1 deletion sblib/src/eib/propertiesBCU2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const PropertyDef* PropertiesBCU2::propertyDef(int objectIdx, PropertyID propert
if (objectIdx >= NUM_PROP_OBJECTS)
{
DB_PROPERTIES(serial.print("propertyDef: ");printObjectIdx(objectIdx); serial.println(" not implemented!"););
return 0;
return nullptr;
}
return findProperty(propertyId, propertiesTab()[objectIdx]);
}
Expand Down
2 changes: 1 addition & 1 deletion sblib/src/eib/userEeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ byte* UserEeprom::findValidPage()
page -= userEepromFlashSize;
}

return 0; // no valid page found
return nullptr; // no valid page found
}

void UserEeprom::readUserEeprom()
Expand Down

0 comments on commit 6095603

Please sign in to comment.