]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
SyntheticClient.h: prefer prefix ++operator for iterators
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Mar 2013 14:36:14 +0000 (15:36 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Mar 2013 15:59:44 +0000 (16:59 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/SyntheticClient.h

index 484ef6f04d02007b19d51b7e05a88000b7ed2ed9..3bbcb73cb1a5e22b3dc59d75f2183bb63b2f6b22 100644 (file)
@@ -123,7 +123,7 @@ class SyntheticClient {
   int get_random_fh() {
     int r = rand() % open_files.size();
     set<int>::iterator it = open_files.begin();
-    while (r--) it++;
+    while (r--) ++it;
     return *it;
   }
 
@@ -133,7 +133,7 @@ class SyntheticClient {
     assert(!subdirs.empty());
     int r = ((rand() % subdirs.size()) + (rand() % subdirs.size())) / 2;  // non-uniform distn
     set<string>::iterator it = subdirs.begin();
-    while (r--) it++;
+    while (r--) ++it;
 
     n1 = cwd;
     n1.push_dentry( *it );
@@ -148,7 +148,7 @@ class SyntheticClient {
     r %= contents.size();
 
     map<string,struct stat*>::iterator it = contents.begin();
-    while (r--) it++;
+    while (r--) ++it;
 
     n2 = cwd;
     n2.push_dentry( it->first );