You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/09/03 19:09:02 UTC

[trafficserver] 05/05: Replace ACTION_RESULT_NONE with nullptr (#7135)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 1cef2fd442cd6089f50d19f8889a7b4a9c390780
Author: Susan Hinrichs <sh...@yahoo-inc.com>
AuthorDate: Tue Sep 1 09:55:07 2020 -0500

    Replace ACTION_RESULT_NONE with nullptr (#7135)
    
    (cherry picked from commit 720cd0c120be28505e85db37f1f5cf489f379934)
---
 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 edd9159..a0b500e 100644
--- a/iocore/eventsystem/I_Action.h
+++ b/iocore/eventsystem/I_Action.h
@@ -193,10 +193,8 @@ public:
   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 4a17973..5156eb8 100644
--- a/iocore/net/I_UDPConnection.h
+++ b/iocore/net/I_UDPConnection.h
@@ -73,7 +73,7 @@ public:
      <br>
      cont->handleEvent(NET_EVENT_DATAGRAM_READ_READY, Queue&lt;UDPPacketInternal&gt; *) 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 37ad8bd..62b47f6 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 c8bc1e8..5d8c71a 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 4d1eaf3..57c8814 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