summaryrefslogtreecommitdiff
path: root/TAO/utils
diff options
context:
space:
mode:
authorPhil Mesnier <mesnierp@ociweb.com>2016-04-11 13:30:59 -0500
committerPhil Mesnier <mesnierp@ociweb.com>2016-04-11 13:33:00 -0500
commit4306d64b214666c5513e695964bcbc53f0b194ac (patch)
tree2719ceb5d189723e17c39bb8aafa0804f8f55d1f /TAO/utils
parentee4b0471b625c93a17854027fa41bb23786bb148 (diff)
downloadATCD-4306d64b214666c5513e695964bcbc53f0b194ac.tar.gz
Fix a couple mre issues identified by Coverity.
Diffstat (limited to 'TAO/utils')
-rw-r--r--TAO/utils/logWalker/Invocation.cpp3
-rw-r--r--TAO/utils/logWalker/Log.cpp20
2 files changed, 15 insertions, 8 deletions
diff --git a/TAO/utils/logWalker/Invocation.cpp b/TAO/utils/logWalker/Invocation.cpp
index d67f77da57c..ddc4935131d 100644
--- a/TAO/utils/logWalker/Invocation.cpp
+++ b/TAO/utils/logWalker/Invocation.cpp
@@ -238,10 +238,11 @@ Invocation::dump_rel_time (ostream &strm, const ACE_Time_Value &tv, const ACE_Ti
int hours = (int)(reltime.sec()) / 3600;
int min = (int)(reltime.sec() %3600) / 60;
int sec = (int)(reltime.sec()) % 60;
+ int subsec = (int)(reltime.usec()/1000);
char buffer[20];
ACE_OS::snprintf (buffer, 20, "%d:%02d:%02d.%03d",
- hours, min, sec, reltime.usec()/1000);
+ hours, min, sec, subsec);
strm << buffer << ' ';
}
diff --git a/TAO/utils/logWalker/Log.cpp b/TAO/utils/logWalker/Log.cpp
index d5fba18af59..5a602702aa9 100644
--- a/TAO/utils/logWalker/Log.cpp
+++ b/TAO/utils/logWalker/Log.cpp
@@ -265,13 +265,13 @@ Log::parse_dump_giop_msg_i (void)
inv->init (this->line_, this->offset_, this->thr_);
this->thr_->push_invocation (inv);
target = inv->octets(true);
- target->time (this->time_);
if (target == 0)
{
ACE_ERROR ((LM_ERROR, "%d: no target octets for new recv reqeust, id = %d\n",
this->offset_, rid));
return;
}
+ target->time (this->time_);
break;
}
case 0: // sending request
@@ -289,13 +289,19 @@ Log::parse_dump_giop_msg_i (void)
}
inv->init (this->line_, this->offset_, this->thr_);
target = inv->octets(mode == 0);
- target->time (this->time_);
- if (target == 0 && mode == 3)
+ if (target == 0)
{
- ACE_ERROR ((LM_ERROR,
- "%d: could not map invocation to target for req_id %d\n",
- this->offset_, rid));
- return;
+ if (mode == 3)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "%d: could not map invocation to target for req_id %d\n",
+ this->offset_, rid));
+ return;
+ }
+ }
+ else
+ {
+ target->time (this->time_);
}
// if (mode == 3)
// this->thr_->exit_wait(pp, this->offset_);