diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-30 17:26:32 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-30 17:26:32 +0000 |
commit | 8c7ee6d114440a178600c6c7a456d6a8aa616ac7 (patch) | |
tree | e3491ed2296b531d20dc94151c2928cdd05a223d | |
parent | adda110243bd246137c2cbd74128e7a730dd4913 (diff) | |
download | ATCD-8c7ee6d114440a178600c6c7a456d6a8aa616ac7.tar.gz |
No need to use char* array for strtok_r's lasts pointer.
-rw-r--r-- | TAO/tao/ORB.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 08852bc40a3..d5024b403c8 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -848,17 +848,17 @@ CORBA_ORB::resolve_initial_references (CORBA::String name, ACE_CString list_of_profiles; // Used by the strtok_r. - char *lasts[BUFSIZ]; + char *lasts = 0; // Append the given object ID to all the end-points of // Default Init Ref. for (char *str = ACE_OS::strtok_r (default_init_ref, ",", - lasts); + &lasts); str != 0 ; str = ACE_OS::strtok_r (0, ",", - lasts)) + &lasts)) { list_of_profiles += ACE_CString (str); list_of_profiles += ACE_CString ("/"); @@ -1515,11 +1515,11 @@ CORBA_ORB::iioploc_string_to_object (const char *string, // Extract the comma separated profiles in the list and // populate the Multiple Profile. TAO_IIOP_Profile *pfile; - char *lasts[BUFSIZ]; + char *lasts = 0; - for (char *str = ACE_OS::strtok_r (list_of_profiles.rep (), ",",lasts); + for (char *str = ACE_OS::strtok_r (list_of_profiles.rep (), ",", &lasts); str != 0 ; - str = ACE_OS::strtok_r (0, ",",lasts)) + str = ACE_OS::strtok_r (0, ",",&lasts)) { ACE_NEW_RETURN (pfile, |