1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-23 08:45:22 +03:00

remove (std::nothrow) where nullptr case is not handled

remove legacy new management
This commit is contained in:
david gauchard
2020-08-24 09:51:58 +02:00
parent a16e1e5b8a
commit 11f7d1766e
42 changed files with 125 additions and 326 deletions

View File

@ -175,10 +175,7 @@ bool SSDPClass::begin() {
assert(NULL == _server);
_server = new (std::nothrow) UdpContext;
if (_server == nullptr) {
return false;
}
_server = new UdpContext;
_server->ref();
IPAddress local = WiFi.localIP();
@ -511,9 +508,7 @@ void SSDPClass::_onTimerStatic(SSDPClass* self) {
void SSDPClass::_startTimer() {
_stopTimer();
_timer = new (std::nothrow) SSDPTimer();
if (_timer == nullptr)
return;
_timer = new SSDPTimer();
ETSTimer* tm = &(_timer->timer);
const int interval = 1000;
os_timer_disarm(tm);