*Some cleanup (mostly whitespace changes)
--HG-- branch : trunk
This commit is contained in:
@@ -2700,7 +2700,7 @@ ACE::handle_timed_accept (ACE_HANDLE listener,
|
||||
|
||||
// We need a loop here if <restart> is enabled.
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
#if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
|
||||
|
||||
|
||||
@@ -647,7 +647,7 @@ ACE_CDR::LongDouble::assign (const ACE_CDR::LongDouble::NativeImpl& rhs)
|
||||
// we have to shift and or the rhs to get the right bytes.
|
||||
size_t li = 2;
|
||||
bool direction = true;
|
||||
for (size_t ri = 1; ri < sizeof (rhs); )
|
||||
for (size_t ri = 1; ri < sizeof (rhs);)
|
||||
{
|
||||
if (direction)
|
||||
{
|
||||
|
||||
@@ -198,7 +198,7 @@ ACE_Capabilities::fillent (const ACE_TCHAR *buf)
|
||||
int
|
||||
ACE_Capabilities::is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line)
|
||||
{
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
// Skip blanks or irrelevant characters
|
||||
while (*line && ACE_OS::ace_isspace(*line))
|
||||
|
||||
@@ -437,7 +437,7 @@ ACE::ldfind (const ACE_TCHAR* filename,
|
||||
nextholder);
|
||||
int result = 0;
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
// Check if at end of search path.
|
||||
if (path_entry == 0)
|
||||
|
||||
@@ -156,7 +156,7 @@ ACE_Logging_Strategy::parse_args (int argc, ACE_TCHAR *argv[])
|
||||
ACE_Get_Opt get_opt (argc, argv,
|
||||
ACE_TEXT ("f:i:k:m:n:N:op:s:t:w"), 0);
|
||||
|
||||
for (int c; (c = get_opt ()) != -1; )
|
||||
for (int c; (c = get_opt ()) != -1;)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
|
||||
@@ -555,7 +555,7 @@ ACE_NT_Service::wait_for_service_state (DWORD desired_state,
|
||||
time_out += *wait_time;
|
||||
|
||||
// Poll until the service reaches the desired state.
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
service_ok = 0 != QueryServiceStatus (this->svc_sc_handle_,
|
||||
&this->svc_status_);
|
||||
|
||||
@@ -566,7 +566,7 @@ ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[])
|
||||
|
||||
ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("b:c:dh:l:P:p:s:T:vr"));
|
||||
|
||||
for (int c; (c = get_opt ()) != -1; )
|
||||
for (int c; (c = get_opt ()) != -1;)
|
||||
switch (c)
|
||||
{
|
||||
case 'c':
|
||||
|
||||
@@ -2063,7 +2063,7 @@ ACE_OS::sema_wait (ACE_sema_t *s)
|
||||
# else /* ACE_USES_WINCE_SEMA_SIMULATION */
|
||||
// Timed wait.
|
||||
int result = -1;
|
||||
for (; ; )
|
||||
for (;;)
|
||||
// Check if the semaphore is avialable or not and wait forever.
|
||||
// Don't bother to grab the lock if it is not available (to avoid
|
||||
// deadlock.)
|
||||
|
||||
@@ -290,7 +290,7 @@ ACE_OS::wcspbrk_emulation (const wchar_t *string,
|
||||
|
||||
while ((c = *string++) != 0)
|
||||
{
|
||||
for (scanp = charset; (sc = *scanp++) != 0; )
|
||||
for (scanp = charset; (sc = *scanp++) != 0;)
|
||||
if (sc == c)
|
||||
return const_cast<wchar_t *> (string - 1);
|
||||
}
|
||||
@@ -341,7 +341,7 @@ ACE_OS::wcsspn_emulation (const wchar_t *string,
|
||||
// Skip any characters in charset, excluding the terminating \0.
|
||||
cont:
|
||||
c = *p++;
|
||||
for (spanp = charset; (sc = *spanp++) != 0; )
|
||||
for (spanp = charset; (sc = *spanp++) != 0;)
|
||||
if (sc == c)
|
||||
goto cont;
|
||||
return (p - 1 - string);
|
||||
|
||||
@@ -1425,7 +1425,7 @@ ACE_POSIX_Asynch_Connect::connect_i (ACE_POSIX_Asynch_Connect_Result *result,
|
||||
-1);
|
||||
}
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
int rc = ACE_OS::connect
|
||||
(handle,
|
||||
|
||||
@@ -521,7 +521,7 @@ ACE_POSIX_Proactor::handle_signal (int, siginfo_t *, ucontext_t *)
|
||||
ACE_Time_Value timeout (0, 0);
|
||||
int result = 0;
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
result = this->handle_events (timeout);
|
||||
if (result != 0 || errno == ETIME)
|
||||
|
||||
@@ -458,7 +458,7 @@ ACE_Proactor::proactor_run_event_loop (PROACTOR_EVENT_HOOK eh)
|
||||
}
|
||||
|
||||
// Run the event loop.
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
// Check the end loop flag. It is ok to do this without lock,
|
||||
// since we care just whether it is zero or non-zero.
|
||||
@@ -515,7 +515,7 @@ ACE_Proactor::proactor_run_event_loop (ACE_Time_Value &tv,
|
||||
}
|
||||
|
||||
// Run the event loop.
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
// Check the end loop flag. It is ok to do this without lock,
|
||||
// since we care just whether it is zero or non-zero.
|
||||
|
||||
@@ -308,7 +308,7 @@ ACE_Reactor::run_alertable_reactor_event_loop (ACE_Time_Value &tv,
|
||||
if (this->reactor_event_loop_done ())
|
||||
return 0;
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
int result = this->implementation_->alertable_handle_events (tv);
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io,
|
||||
absolute_time = ACE_OS::gettimeofday () + *timeout;
|
||||
|
||||
// Loop until success or failure.
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
handle = ACE_OS::open (remote_sap.get_path_name(), flags, perms, sa);
|
||||
if (handle != ACE_INVALID_HANDLE)
|
||||
|
||||
@@ -446,7 +446,7 @@ ACE_Tokenizer::next (void)
|
||||
ACE_TCHAR *next_token;
|
||||
|
||||
// Skip all leading delimiters.
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
// Check for end of string.
|
||||
if (buffer_[index_] == '\0')
|
||||
@@ -501,7 +501,7 @@ ACE_Tokenizer::next (void)
|
||||
}
|
||||
|
||||
// Step through finding the next delimiter or EOS.
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
// Advance pointer.
|
||||
index_++;
|
||||
|
||||
@@ -213,7 +213,7 @@ ACE_SString::rfind (char c, size_type pos) const
|
||||
|
||||
// Do not change to prefix operator! Proper operation of this loop
|
||||
// depends on postfix decrement behavior.
|
||||
for (size_type i = pos; i-- != 0; )
|
||||
for (size_type i = pos; i-- != 0;)
|
||||
if (this->rep_[i] == c)
|
||||
return i;
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ ACE_Service_Config::parse_args_i (int argc, ACE_TCHAR *argv[])
|
||||
superargv.add (argv[0]);
|
||||
|
||||
//FUZZ: disable check_for_lack_ACE_OS
|
||||
for (int c; (c = getopt ()) != -1; )
|
||||
for (int c; (c = getopt ()) != -1;)
|
||||
//FUZZ: enable check_for_lack_ACE_OS
|
||||
switch (c)
|
||||
{
|
||||
|
||||
@@ -1135,7 +1135,7 @@ ACE_Service_Gestalt::parse_args_i (int argc,
|
||||
return -1;
|
||||
|
||||
//FUZZ: disable check_for_lack_ACE_OS
|
||||
for (int c; (argc != 0) && ((c = getopt ()) != -1); )
|
||||
for (int c; (argc != 0) && ((c = getopt ()) != -1);)
|
||||
//FUZZ: enable check_for_lack_ACE_OS
|
||||
switch (c)
|
||||
{
|
||||
|
||||
@@ -111,7 +111,7 @@ ACE_Service_Manager::init (int argc, ACE_TCHAR *argv[])
|
||||
//FUZZ: disable check_for_lack_ACE_OS
|
||||
ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("dp:s:"), 0); // Start at argv[0]
|
||||
|
||||
for (int c; (c = getopt ()) != -1; )
|
||||
for (int c; (c = getopt ()) != -1;)
|
||||
//FUZZ: enable check_for_lack_ACE_OS
|
||||
switch (c)
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ ACE_Service_Repository::fini (void)
|
||||
// Do not be tempted to use the prefix decrement operator. Use
|
||||
// postfix decrement operator since the index is unsigned and may
|
||||
// wrap around the 0
|
||||
for (size_t i = this->current_size_; i-- != 0; )
|
||||
for (size_t i = this->current_size_; i-- != 0;)
|
||||
{
|
||||
// <fini> the services in reverse order.
|
||||
ACE_Service_Type *s =
|
||||
@@ -205,7 +205,7 @@ ACE_Service_Repository::close (void)
|
||||
|
||||
// Do not use the prefix decrement operator since the index is
|
||||
// unsigned and may wrap around the 0.
|
||||
for (size_t i = this->current_size_; i-- != 0; )
|
||||
for (size_t i = this->current_size_; i-- != 0;)
|
||||
{
|
||||
// Delete services in reverse order.
|
||||
ACE_Service_Type *s =
|
||||
|
||||
@@ -360,7 +360,7 @@ ACE_Stream_Type::fini (void) const
|
||||
void *obj = this->object ();
|
||||
MT_Stream *str = (MT_Stream *) obj;
|
||||
|
||||
for (ACE_Module_Type *m = this->head_; m != 0; )
|
||||
for (ACE_Module_Type *m = this->head_; m != 0;)
|
||||
{
|
||||
ACE_Module_Type *t = m->link ();
|
||||
|
||||
@@ -390,7 +390,7 @@ ACE_Stream_Type::remove (ACE_Module_Type *mod)
|
||||
MT_Stream *str = (MT_Stream *) obj;
|
||||
int result = 0;
|
||||
|
||||
for (ACE_Module_Type *m = this->head_; m != 0; )
|
||||
for (ACE_Module_Type *m = this->head_; m != 0;)
|
||||
{
|
||||
// We need to do this first so we don't bomb out if we delete m!
|
||||
ACE_Module_Type *link = m->link ();
|
||||
|
||||
@@ -1076,7 +1076,7 @@ get_ip_interfaces_aix (size_t &count,
|
||||
char *buf_end = buf_start + ifc.ifc_len;
|
||||
|
||||
num_ifs = 0;
|
||||
for (char *ptr = buf_start; ptr < buf_end; )
|
||||
for (char *ptr = buf_start; ptr < buf_end;)
|
||||
{
|
||||
struct ifreq *req = reinterpret_cast<struct ifreq *>(ptr);
|
||||
ptr += IFNAMSIZ;
|
||||
@@ -1090,7 +1090,7 @@ get_ip_interfaces_aix (size_t &count,
|
||||
}
|
||||
ACE_NEW_RETURN (addrs,ACE_INET_Addr[num_ifs], -1);
|
||||
|
||||
for (char * ptr = buf_start; ptr < buf_end; )
|
||||
for (char * ptr = buf_start; ptr < buf_end;)
|
||||
{
|
||||
struct ifreq *req = reinterpret_cast<struct ifreq *>(ptr);
|
||||
// skip the interface name
|
||||
|
||||
@@ -331,7 +331,7 @@ ACE_Svc_Conf_Lexer::scan (YYSTYPE* ace_yylval,
|
||||
bool string_end_found = false;
|
||||
if (current > buffer->index_)
|
||||
{
|
||||
for (size_t i = current - buffer->index_; i-- != 0; )
|
||||
for (size_t i = current - buffer->index_; i-- != 0;)
|
||||
{
|
||||
if (source[i] == buffer->string_start_)
|
||||
{
|
||||
|
||||
@@ -938,7 +938,7 @@ ace_yytnamerr (char *ace_yyres, const char *ace_yystr)
|
||||
YYSIZE_T ace_yyn = 0;
|
||||
char const *ace_yyp = ace_yystr;
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
switch (*++ace_yyp)
|
||||
{
|
||||
case '\'':
|
||||
@@ -1786,7 +1786,7 @@ ace_yyerrorlab:
|
||||
ace_yyerrlab1:
|
||||
ace_yyerrstatus = 3; /* Each real token shifted decrements this. */
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
ace_yyn = ace_yypact[ace_yystate];
|
||||
if (ace_yyn != YYPACT_NINF)
|
||||
|
||||
@@ -2583,7 +2583,7 @@ ACE_WIN32_Asynch_Connect::connect_i (ACE_WIN32_Asynch_Connect_Result *result,
|
||||
-1);
|
||||
}
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
int rc = ACE_OS::connect
|
||||
(handle,
|
||||
|
||||
@@ -83,7 +83,7 @@ ACE_WIN32_Proactor::close (void)
|
||||
{
|
||||
// To avoid memory leaks we should delete all results from queue.
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
ACE_OVERLAPPED *overlapped = 0;
|
||||
u_long bytes_transferred = 0;
|
||||
|
||||
Reference in New Issue
Block a user