Reduce variable scopes

This commit is contained in:
practicalswift
2018-03-25 22:49:33 +02:00
parent 7466a26cab
commit 6a318e48a6
3 changed files with 3 additions and 5 deletions

View File

@@ -704,9 +704,8 @@ static constexpr char ExitCommand = 'X';
static void TestOtherProcess(fs::path dirname, std::string lockname, int fd)
{
char ch;
int rv;
while (true) {
rv = read(fd, &ch, 1); // Wait for command
int rv = read(fd, &ch, 1); // Wait for command
assert(rv == 1);
switch(ch) {
case LockCommand: