persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp
branchRCL_3
changeset 10 fa9941cf3867
parent 0 08ec8eefde2f
child 16 6b6fd149daa2
--- a/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp	Sat Feb 20 00:33:55 2010 +0200
+++ b/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp	Fri Mar 12 15:51:02 2010 +0200
@@ -156,7 +156,7 @@
 	des.Append(TChar(0));
 	TInt len = wcstombs((char*)aOut.Ptr(), (const wchar_t*)des.Ptr(), KMaxFileName);
 	//Check the file name length. If it is longer than KMaxFileName characters, then the file name is not valid.
-	if(len >= 0 && len <= KMaxFileName)
+	if((TUint)len <= KMaxFileName)
 		{
 		aOut.SetLength(len);
 		return ETrue;
@@ -185,7 +185,7 @@
 	const wchar_t* src = reinterpret_cast <const wchar_t*> (aFileName.Ptr());
 	TInt len = wcstombs((char*)aFileNameDestBuf.Ptr(), src, KMaxFileName);
 	//Check the file name length. If it is longer than KMaxFileName characters, then the file name is not valid.
-	if(len >= 0 && len <= KMaxFileName)
+	if((TUint)len <= KMaxFileName)
 		{
 		aFileNameDestBuf.SetLength(len + 1);
 		aFileNameDestBuf[len] = 0;