summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ace')
-rw-r--r--ace/Process_Manager.cpp8
-rw-r--r--ace/Signal.cpp4
-rw-r--r--ace/Thread_Manager.cpp52
3 files changed, 31 insertions, 33 deletions
diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp
index 4aa30ef5c5d..9046f69011c 100644
--- a/ace/Process_Manager.cpp
+++ b/ace/Process_Manager.cpp
@@ -606,13 +606,13 @@ ACE_Process_Manager::terminate (pid_t pid)
// Check for duplicates and bail out if they're already
// registered...
- ssize_t i = this->find_proc (pid);
+ ssize_t const i = this->find_proc (pid);
if (i == -1)
// set "no such process" error
return -1;
- int result = ACE::terminate_process (pid);
+ int const result = ACE::terminate_process (pid);
if (result != -1)
{
@@ -621,8 +621,8 @@ ACE_Process_Manager::terminate (pid_t pid)
this->remove_proc (i);
return 0;
}
- else
- return -1;
+
+ return -1;
}
int
diff --git a/ace/Signal.cpp b/ace/Signal.cpp
index 0978b21fad3..8e7763940c3 100644
--- a/ace/Signal.cpp
+++ b/ace/Signal.cpp
@@ -697,8 +697,8 @@ ACE_Sig_Handlers::register_handler (int signum,
return ace_sig_adapter->sigkey ();
}
}
- else
- return -1;
+
+ return -1;
}
// Remove the ACE_Event_Handler currently associated with <signum>.
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
index 4669856de3d..e4511fdb00c 100644
--- a/ace/Thread_Manager.cpp
+++ b/ace/Thread_Manager.cpp
@@ -630,40 +630,38 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func,
new_thr_desc->sync_->release ();
return -1;
}
- else
- {
+
#if defined (ACE_HAS_WTHREADS)
- // Have to duplicate handle if client asks for it.
- // @@ How are thread handles implemented on AIX? Do they
- // also need to be duplicated?
- if (t_handle != 0)
+ // Have to duplicate handle if client asks for it.
+ // @@ How are thread handles implemented on AIX? Do they
+ // also need to be duplicated?
+ if (t_handle != 0)
# if defined (ACE_HAS_WINCE)
- *t_handle = thr_handle;
+ *t_handle = thr_handle;
# else /* ! ACE_HAS_WINCE */
- (void) ::DuplicateHandle (::GetCurrentProcess (),
- thr_handle,
- ::GetCurrentProcess (),
- t_handle,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS);
+ (void) ::DuplicateHandle (::GetCurrentProcess (),
+ thr_handle,
+ ::GetCurrentProcess (),
+ t_handle,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS);
# endif /* ! ACE_HAS_WINCE */
#else /* ! ACE_HAS_WTHREADS */
- if (t_handle != 0)
- *t_handle = thr_handle;
+ if (t_handle != 0)
+ *t_handle = thr_handle;
#endif /* ! ACE_HAS_WTHREADS && ! VXWORKS */
- // append_thr also put the <new_thr_desc> into Thread_Manager's
- // double-linked list. Only after this point, can we manipulate
- // double-linked list from a spawned thread's context.
- return this->append_thr (*t_id,
- thr_handle,
- ACE_THR_SPAWNED,
- grp_id,
- task,
- flags,
- new_thr_desc.release ());
- }
+ // append_thr also put the <new_thr_desc> into Thread_Manager's
+ // double-linked list. Only after this point, can we manipulate
+ // double-linked list from a spawned thread's context.
+ return this->append_thr (*t_id,
+ thr_handle,
+ ACE_THR_SPAWNED,
+ grp_id,
+ task,
+ flags,
+ new_thr_desc.release ());
}
int