mirror of https://github.com/ARMmbed/mbed-os.git
Remove pointless null check in operator delete
free() checks for NULL, no need to add another check.pull/5583/head
parent
4e222952d7
commit
ff6bc08c53
|
@ -1045,15 +1045,11 @@ void *operator new[](std::size_t count, const std::nothrow_t& tag)
|
|||
|
||||
void operator delete(void *ptr)
|
||||
{
|
||||
if (ptr != NULL) {
|
||||
free(ptr);
|
||||
}
|
||||
free(ptr);
|
||||
}
|
||||
void operator delete[](void *ptr)
|
||||
{
|
||||
if (ptr != NULL) {
|
||||
free(ptr);
|
||||
}
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
/* @brief standard c library clock() function.
|
||||
|
|
Loading…
Reference in New Issue