diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-02-21 22:29:49 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-02-21 22:29:49 +0000 |
commit | f11224da696a623a28510aafb10532ca999be51b (patch) | |
tree | 63afe56dbcdb765415669eeb73315cf45b03b9ca /ACE/ace/Parse_Node.cpp | |
parent | cc970acff36ed652b93a32c8074558c310349658 (diff) | |
download | ATCD-f11224da696a623a28510aafb10532ca999be51b.tar.gz |
ChangeLogTag:Wed Feb 21 19:27:14 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
Diffstat (limited to 'ACE/ace/Parse_Node.cpp')
-rw-r--r-- | ACE/ace/Parse_Node.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/ACE/ace/Parse_Node.cpp b/ACE/ace/Parse_Node.cpp index 110e52f4673..a74d070dd3b 100644 --- a/ACE/ace/Parse_Node.cpp +++ b/ACE/ace/Parse_Node.cpp @@ -587,36 +587,35 @@ ACE_Function_Node::symbol (ACE_Service_Gestalt *, ACE_TRACE ("ACE_Function_Node::symbol"); if (this->open_dll (yyerrno) == 0) { - ACE_Service_Factory_Ptr func = 0; this->symbol_ = 0; // Locate the factory function <function_name> in the shared // object. - ACE_TCHAR *function_name = const_cast<ACE_TCHAR *> (this->function_name_); - void *func_p = this->dll_.symbol (function_name); + ACE_TCHAR * const function_name = + const_cast<ACE_TCHAR *> (this->function_name_); + + void * const func_p = this->dll_.symbol (function_name); if (func_p == 0) { ++yyerrno; - if (this->symbol_ == 0) - { - ++yyerrno; - #ifndef ACE_NLOGGING - ACE_TCHAR *errmsg = this->dll_.error (); - ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("DLL::symbol failed for function %s: ") - ACE_LIB_TEXT ("%s\n"), - function_name, - errmsg ? errmsg : - ACE_LIB_TEXT ("no error reported"))); + ACE_TCHAR * const errmsg = this->dll_.error (); + ACE_ERROR ((LM_ERROR, + ACE_LIB_TEXT ("DLL::symbol failed for function %s: ") + ACE_LIB_TEXT ("%s\n"), + function_name, + errmsg ? errmsg : ACE_LIB_TEXT ("no error reported"))); #endif /* ACE_NLOGGING */ - return 0; - } + return 0; } - ptrdiff_t temp_p = reinterpret_cast<ptrdiff_t> (func_p); - func = reinterpret_cast<ACE_Service_Factory_Ptr> (temp_p); + + intptr_t const temp_p = reinterpret_cast<intptr_t> (func_p); + + ACE_Service_Factory_Ptr func = + reinterpret_cast<ACE_Service_Factory_Ptr> (temp_p); + // Invoke the factory function and record it's return value. this->symbol_ = (*func) (gobbler); |