Use C++ language supported 'nullptr' (#13944)

This commit is contained in:
Scott Lahteine
2019-05-09 11:45:55 -05:00
committed by GitHub
parent e53d7e5517
commit ad4ffa1d2f
70 changed files with 670 additions and 668 deletions

View File

@ -93,7 +93,7 @@ bool UnwReportRetAddr(UnwState * const state, uint32_t addr) {
UnwReport entry;
// We found two acceptable values.
entry.name = NULL;
entry.name = nullptr;
entry.address = addr & 0xFFFFFFFE; // Remove Thumb bit
entry.function = 0;

View File

@ -47,17 +47,17 @@ static const UnwTabEntry *UnwTabSearchIndex(const UnwTabEntry *start, const UnwT
}
/*
* Get the function name or NULL if not found
* Get the function name or nullptr if not found
*/
static const char *UnwTabGetFunctionName(const UnwindCallbacks *cb, uint32_t address) {
uint32_t flag_word = 0;
if (!cb->readW(address-4,&flag_word))
return NULL;
return nullptr;
if ((flag_word & 0xFF000000) == 0xFF000000) {
return (const char *)(address - 4 - (flag_word & 0x00FFFFFF));
}
return NULL;
return nullptr;
}
/**