]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client/SyntheticClient.cc: reduce scope of some variables
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 3 Feb 2016 12:49:21 +0000 (13:49 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 19 Feb 2016 11:50:35 +0000 (12:50 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/SyntheticClient.cc

index fe06d22649523836d08930316e8b84991dba811c..78fd7ce51200e6e3c4855280e244a2d2567f69af 100644 (file)
@@ -2467,12 +2467,11 @@ int SyntheticClient::read_random(string& fn, int size, int rdsize)   // size is
     if (read) {
       int bad = 0;
       int64_t *p = (int64_t*)buf;
-      int64_t readoff, readclient;
       while ((char*)p + 32 < buf + rdsize) {
-       readoff = *p;
+       int64_t readoff = *p;
        int64_t wantoff = offset*rdsize + (int64_t)((char*)p - buf);
        p++;
-       readclient = *p;
+       int64_t readclient = *p;
        p++;
        if (readoff != wantoff || readclient != client->get_nodeid()) {
          if (!bad)
@@ -2599,12 +2598,11 @@ int SyntheticClient::read_random_ex(string& fn, int size, int rdsize)   // size
     if (read) {
       int bad = 0;
       int64_t *p = (int64_t*)buf;
-      int64_t readoff, readclient;
       while ((char*)p + 32 < buf + rdsize) {
-       readoff = *p;
+       int64_t readoff = *p;
        int64_t wantoff = offset*rdsize + (int64_t)((char*)p - buf);
        p++;
-       readclient = *p;
+       int64_t readclient = *p;
        p++;
        if (readoff != wantoff || readclient != client->get_nodeid()) { 
          if (!bad)