persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp
changeset 15 3eacc0623088
parent 0 08ec8eefde2f
child 16 6b6fd149daa2
--- a/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp	Fri Mar 19 10:00:55 2010 +0200
+++ b/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp	Fri Apr 16 16:49:27 2010 +0300
@@ -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;