openenvutils/commandshell/shell/commands/ps/src/main.cpp
changeset 69 dcd4152cfe55
parent 0 2e3d3ce01487
--- a/openenvutils/commandshell/shell/commands/ps/src/main.cpp	Thu Sep 02 20:36:53 2010 +0300
+++ b/openenvutils/commandshell/shell/commands/ps/src/main.cpp	Fri Sep 17 08:30:44 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -259,13 +259,27 @@
 			if((fflag))
 				{
 				if(rem<=(proc.FileName()).Length()+5)
-					Result.ReAlloc((proc.FileName()).Length()+Result.MaxLength());
+				    {
+					c = Result.ReAlloc((proc.FileName()).Length()+Result.MaxLength());
+					if(c!=KErrNone)
+					    {
+					    printf("Error") ;
+					    exit(1);
+					    }                   
+				    }
 				Result.AppendFormat(_L(" [%s]"),(proc.FileName()).PtrZ());
 				}
 			else 
 				{
 				if(rem<=procname.Length())
-					Result.ReAlloc(procname.Length()+Result.MaxLength());
+				    {
+					c = Result.ReAlloc(procname.Length()+Result.MaxLength());
+					if(c!=KErrNone)
+					    {
+					    printf("Error") ;
+					    exit(1);
+					    }					    
+				    }
 				Result.Append(procname);		
 				}