[gparted] Fix expression always true compiler warning



commit 6c9d0cf6f1ede75a215aaee0cf5dcdbf747f1624
Author: Curtis Gedak <gedakc gmail com>
Date:   Sat Jul 16 09:55:31 2011 -0600

    Fix expression always true compiler warning
    
    Removed expression that is always true.  Prior to this change the
    compiler would complain with the following message:
    
    error: comparison of unsigned expression >= 0 is always true

 src/Dialog_Progress.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index e047510..c6f02b7 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -165,7 +165,7 @@ void Dialog_Progress::on_signal_update( const OperationDetail & operationdetail
 	else//it's an new od which needs to be added to the model.
 	{
 		unsigned int pos = operationdetail .get_treepath() .rfind( ":" ) ;
-		if ( pos >= 0 && pos < operationdetail .get_treepath() .length() )
+		if ( pos < operationdetail .get_treepath() .length() )
 			iter = treestore_operations ->get_iter( operationdetail .get_treepath() 
 							.substr( 0, operationdetail .get_treepath() .rfind( ":" ) ) ) ;
 		else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]