summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-10-23 13:55:17 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-10-23 13:55:17 +0200
commitc9c176cf7f50117e144581839da7c91b556586e1 (patch)
tree0c830a8f5cf2e887b0c0ddd508e0f555e9e239ae
parentaa58d652d4a4bb66cb15c6688c11cc4fc33fd743 (diff)
downloadATCD-c9c176cf7f50117e144581839da7c91b556586e1.tar.gz
Minor cleanup
* ACE/ace/Sig_Handler.cpp: * ACE/ace/Signal.h:
-rw-r--r--ACE/ace/Sig_Handler.cpp14
-rw-r--r--ACE/ace/Signal.h4
2 files changed, 8 insertions, 10 deletions
diff --git a/ACE/ace/Sig_Handler.cpp b/ACE/ace/Sig_Handler.cpp
index 9b6e4a8e272..78c00f1ab31 100644
--- a/ACE/ace/Sig_Handler.cpp
+++ b/ACE/ace/Sig_Handler.cpp
@@ -346,8 +346,8 @@ ACE_Sig_Handlers::register_handler (int signum,
if (ACE_Sig_Handler::in_range (signum))
{
- ACE_Sig_Adapter *ace_sig_adapter = 0; // Our signal handler.
- ACE_Sig_Adapter *extern_sh = 0; // An external signal handler.
+ ACE_Sig_Adapter *ace_sig_adapter = nullptr; // Our signal handler.
+ ACE_Sig_Adapter *extern_sh = nullptr; // An external signal handler.
ACE_Sig_Action sa;
// Get current signal disposition.
@@ -355,7 +355,6 @@ ACE_Sig_Handlers::register_handler (int signum,
// Check whether we are already in control of the signal
// handling disposition...
-
if (!(sa.handler () == ace_signal_handlers_dispatcher
|| sa.handler () == ACE_SignalHandler (SIG_IGN)
|| sa.handler () == ACE_SignalHandler (SIG_DFL)))
@@ -364,7 +363,6 @@ ACE_Sig_Handlers::register_handler (int signum,
// Upto here we never disabled RESTART_MODE. Thus,
// RESTART_MODE can only be changed by 3rd party libraries.
-
if (ACE_BIT_DISABLED (sa.flags (), SA_RESTART)
&& ACE_Sig_Handlers::third_party_sig_handler_)
// Toggling is disallowed since we might break 3rd party
@@ -397,7 +395,7 @@ ACE_Sig_Handlers::register_handler (int signum,
// Add the ACE signal handler to the set of handlers for this
// signal (make sure it goes before the external one if there is
// one of these).
- int result = ACE_Sig_Handlers_Set::instance (signum)->insert (ace_sig_adapter);
+ int const result = ACE_Sig_Handlers_Set::instance (signum)->insert (ace_sig_adapter);
if (result == -1)
{
@@ -580,7 +578,7 @@ ACE_Sig_Handlers::handler (int signum, ACE_Event_Handler *new_sh)
ACE_SIG_HANDLERS_SET *handler_set =
ACE_Sig_Handlers_Set::instance (signum);
ACE_SIG_HANDLERS_ITERATOR handler_iterator (*handler_set);
- ACE_Event_Handler **eh = 0;
+ ACE_Event_Handler **eh = nullptr;
// Find the first handler...
handler_iterator.next (eh);
@@ -591,12 +589,12 @@ ACE_Sig_Handlers::handler (int signum, ACE_Event_Handler *new_sh)
// ... and then insert the new signal handler into the beginning of
// the set (note, this is a bit too tied up in the implementation of
// ACE_Unbounded_Set...).
- ACE_Sig_Adapter *temp = 0;
+ ACE_Sig_Adapter *temp = nullptr;
ACE_NEW_RETURN (temp,
ACE_Sig_Adapter (new_sh,
++ACE_Sig_Handlers::sigkey_),
- 0);
+ nullptr);
handler_set->insert (temp);
return *eh;
}
diff --git a/ACE/ace/Signal.h b/ACE/ace/Signal.h
index 99f49445b21..d16268539fa 100644
--- a/ACE/ace/Signal.h
+++ b/ACE/ace/Signal.h
@@ -223,7 +223,7 @@ public:
/// This is kind of conditional Guard, needed when guard should be
/// activated only when a specific condition met. When condition ==
/// true (default), Guard is activated
- ACE_Sig_Guard (ACE_Sig_Set *mask = 0, bool condition = true);
+ ACE_Sig_Guard (ACE_Sig_Set *mask = nullptr, bool condition = true);
/// Restore blocked signals.
~ACE_Sig_Guard ();
@@ -239,7 +239,7 @@ private:
ACE_Sig_Set omask_;
/// Guard Condition
- bool condition_;
+ bool const condition_;
};
ACE_END_VERSIONED_NAMESPACE_DECL