Merge refs/heads/master from origin
authorCarl Baldwin <cnb@ball.(none)>
Wed, 26 Oct 2005 03:03:50 +0000 (21:03 -0600)
committerCarl Baldwin <cnb@ball.(none)>
Wed, 26 Oct 2005 03:03:50 +0000 (21:03 -0600)
main.cpp

index de22d91e28bb13388dd7dfd2b4b72863b0ee3288..2323efe3295da8031ab88a111b590f38a8a6787d 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -29,20 +29,19 @@ template<class I, class O, class INT>
 bool copy_until_full( I begin, I end, O out, INT &space ) {
   bool complete = true;
 
-  I i = begin;
-  while( 0 != space && i != end ) {
-    INT size = (*i)->getFileSize();
+  while( 0 != space && begin != end ) {
+    INT size = (*begin)->getFileSize();
     INT blocksize = blocks( size ) * bytes_in_block;
 
     if( blocksize <= space ) {
       space -= blocksize;
-      out = *i;
+      out = *begin;
       ++out;
     } else {
       // We missed a file that should be included so the backup is not complete
       complete = false;
     }
-    ++i;
+    ++begin;
   }
   return complete;
 }