From 67b5fc7db055434390363a425e09be5956eab282 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Mon, 24 Aug 2020 16:40:39 +0000 Subject: [PATCH] Replace ACTION_RESULT_NONE with nullptr --- iocore/eventsystem/I_Action.h | 2 -- iocore/net/I_UDPConnection.h | 2 +- iocore/net/P_UnixUDPConnection.h | 2 +- iocore/net/UnixNetProcessor.cc | 2 +- iocore/net/UnixUDPConnection.cc | 4 ++-- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/iocore/eventsystem/I_Action.h b/iocore/eventsystem/I_Action.h index 1fb3380d1b2..659f2b54ad3 100644 --- a/iocore/eventsystem/I_Action.h +++ b/iocore/eventsystem/I_Action.h @@ -198,10 +198,8 @@ class Action virtual ~Action() {} }; -#define ACTION_RESULT_NONE MAKE_ACTION_RESULT(0) #define ACTION_RESULT_DONE MAKE_ACTION_RESULT(1) #define ACTION_IO_ERROR MAKE_ACTION_RESULT(2) -#define ACTION_RESULT_INLINE MAKE_ACTION_RESULT(3) // Use these classes by // #define ACTION_RESULT_HOST_DB_OFFLINE diff --git a/iocore/net/I_UDPConnection.h b/iocore/net/I_UDPConnection.h index 4a17973735c..5156eb8ea7d 100644 --- a/iocore/net/I_UDPConnection.h +++ b/iocore/net/I_UDPConnection.h @@ -73,7 +73,7 @@ class UDPConnection : public Continuation
cont->handleEvent(NET_EVENT_DATAGRAM_READ_READY, Queue<UDPPacketInternal> *) on incoming packets. - @return Action* Always returns ACTION_RESULT_NONE. Can't be + @return Action* Always returns nullptr. Can't be cancelled via this Action. @param c continuation to be called back */ diff --git a/iocore/net/P_UnixUDPConnection.h b/iocore/net/P_UnixUDPConnection.h index 37ad8bd147b..62b47f6dd92 100644 --- a/iocore/net/P_UnixUDPConnection.h +++ b/iocore/net/P_UnixUDPConnection.h @@ -98,7 +98,7 @@ UDPConnection::recv(Continuation *c) p->continuation = c; ink_assert(c != nullptr); mutex = c->mutex; - return ACTION_RESULT_NONE; + return nullptr; } TS_INLINE UDPConnection * diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc index c8bc1e850f6..5d8c71aa717 100644 --- a/iocore/net/UnixNetProcessor.cc +++ b/iocore/net/UnixNetProcessor.cc @@ -181,7 +181,7 @@ Action * UnixNetProcessor::connect_re_internal(Continuation *cont, sockaddr const *target, NetVCOptions *opt) { if (TSSystemState::is_event_system_shut_down()) { - return ACTION_RESULT_NONE; + return nullptr; } EThread *t = eventProcessor.assign_affinity_by_type(cont, opt->etype); UnixNetVConnection *vc = (UnixNetVConnection *)this->allocate_vc(t); diff --git a/iocore/net/UnixUDPConnection.cc b/iocore/net/UnixUDPConnection.cc index 4d1eaf370bf..57c8814f2c7 100644 --- a/iocore/net/UnixUDPConnection.cc +++ b/iocore/net/UnixUDPConnection.cc @@ -121,7 +121,7 @@ UDPConnection::send(Continuation *c, UDPPacket *xp) if (shouldDestroy()) { ink_assert(!"freeing packet sent on dead connection"); p->free(); - return ACTION_RESULT_NONE; + return nullptr; } ink_assert(mutex == c->mutex); @@ -132,7 +132,7 @@ UDPConnection::send(Continuation *c, UDPPacket *xp) mutex = c->mutex; p->reqGenerationNum = conn->sendGenerationNum; get_UDPNetHandler(conn->ethread)->udpOutQueue.send(p); - return ACTION_RESULT_NONE; + return nullptr; } void