diff -r a1e347446159 -r 28ccaba883f4 utilitylibraries/libutils/src/stringtodescriptor8.cpp --- a/utilitylibraries/libutils/src/stringtodescriptor8.cpp Fri Sep 17 19:25:42 2010 +0530 +++ b/utilitylibraries/libutils/src/stringtodescriptor8.cpp Wed Oct 13 19:39:18 2010 +0530 @@ -79,7 +79,7 @@ * @param aSrc is the string to be converted , aDes is the * reference to the descriptor where the result of conversion * is stored - * @return Status code (0 is ESuccess, -3 is EStringNoData) + * @return Status code (0 is ESuccess, -3 is EStringNoData, -1 is EInsufficientMemory) */ EXPORT_C int StringToTptr8 (string& aSrc, TPtr8& aDes) @@ -110,7 +110,7 @@ * reference to the descriptor where the result of conversion * is stored * @return Status code (0 is ESuccess, -1 is EInsufficientMemory, - * -3 is EStringNoData , -5 is EUSENEWMAXL ) + * -3 is EStringNoData , -5 is EUseNewMaxL , -4 is EInvalidPointer ) */ EXPORT_C int StringToHbufc8(string& aSrc , HBufC8* aDes) @@ -148,7 +148,7 @@ * @param aSrc is the string to be converted , aDes is the * reference to the descriptor where the result of conversion * is stored - * @return Status code (0 is ESuccess,-3 is EStringNoData) + * @return Status code (0 is ESuccess,-3 is EStringNoData, -9 is EInsufficientSystemMemory) */ EXPORT_C int StringToRbuf8(const string& aSrc, RBuf8& aDes) @@ -161,15 +161,8 @@ } int ilen = strlen(charString); - - if (KErrNone == aDes.Create(ilen)) - { - aDes.Copy((const unsigned char *)charString, ilen); - } - else - { - retval = EInsufficientSystemMemory; - } + + aDes.Copy((const unsigned char *)charString, ilen); - return retval; + return retval; }