diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-03-29 07:03:58 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-03-29 07:03:58 +0000 |
commit | 108f4cd5429958c329ae6cec8e515dd9b2e224c4 (patch) | |
tree | ad2b5c33aa24ddc68fda20918db6a1f9666f5029 | |
parent | 9a301b72c82d6275a1f91676570404a703836033 (diff) | |
download | ATCD-108f4cd5429958c329ae6cec8e515dd9b2e224c4.tar.gz |
ChangeLogTag: Wed Mar 29 06:44:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | ace/Log_Msg.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 0372afe1992..90d9bfcb609 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -670,7 +670,7 @@ ACE_Log_Msg::ACE_Log_Msg (void) } } - ACE_NEW_NORETURN (this->msg_, ACE_TCHAR[ACE_MAXLOGMSGLEN+1]); + ACE_NEW_NORETURN (this->msg_, ACE_TCHAR[ACE_MAXLOGMSGLEN+1]); } ACE_Log_Msg::~ACE_Log_Msg (void) @@ -740,10 +740,7 @@ ACE_Log_Msg::~ACE_Log_Msg (void) } #endif - if (this->msg_) - { - delete[] this->msg_; - } + delete[] this->msg_; } // Open the sender-side of the message queue. @@ -2167,11 +2164,12 @@ ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority, if (this->log_priority_enabled (log_priority) == 0) return 0; - ACE_TCHAR* buf; - size_t buf_sz = ACE_Log_Record::MAXLOGMSGLEN - ACE_Log_Record::VERBOSE_LEN - 58; + ACE_TCHAR* buf = 0; + const size_t buf_sz = + ACE_Log_Record::MAXLOGMSGLEN - ACE_Log_Record::VERBOSE_LEN - 58; ACE_NEW_RETURN (buf, ACE_TCHAR[buf_sz], -1); - ACE_TCHAR *msg_buf; + ACE_TCHAR *msg_buf = 0; const size_t text_sz = text ? ACE_OS::strlen(text) : 0; ACE_NEW_RETURN (msg_buf, ACE_TCHAR[text_sz + 58], |