From 729117f90ef2d802e56ec2e417a399937bd10d8d Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 3 Feb 2016 13:49:21 +0100 Subject: [PATCH] client/SyntheticClient.cc: reduce scope of some variables Signed-off-by: Danny Al-Gaaf --- src/client/SyntheticClient.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/SyntheticClient.cc b/src/client/SyntheticClient.cc index fe06d226495..78fd7ce5120 100644 --- a/src/client/SyntheticClient.cc +++ b/src/client/SyntheticClient.cc @@ -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) -- 2.47.3