Skip to content

Commit

Permalink
Merge pull request #5583 from kjbracey-arm/delete_null
Browse files Browse the repository at this point in the history
Remove pointless null check in operator delete
  • Loading branch information
theotherjimmy committed Nov 27, 2017
2 parents 33c9726 + ff6bc08 commit 70e7b40
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions platform/mbed_retarget.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit 70e7b40

Please sign in to comment.