--- a/utilitylibraries/libutils/src/stringtodescriptor8.cpp Fri Jun 04 16:20:51 2010 +0100
+++ b/utilitylibraries/libutils/src/stringtodescriptor8.cpp Fri Jun 11 15:26:22 2010 +0300
@@ -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;
}