Collapse variable initialisation & assignment into just init

* This doesn't make any difference but removes some warnings from PVS Studio and
  is slightly cleaner.
This commit is contained in:
baldurk
2020-01-21 14:28:47 +00:00
parent 4a779e371b
commit 6b1d186e6f
4 changed files with 7 additions and 14 deletions
+1 -3
View File
@@ -447,13 +447,11 @@ bool HasRootAccess(const rdcstr &deviceID)
{
RDCLOG("Checking for root access on %s", deviceID.c_str());
Process::ProcessResult result = {};
// Try switching adb to root and check a few indicators for success
// Nothing will fall over if we get a false positive here, it just enables
// additional methods of getting things set up.
result = adbExecCommand(deviceID, "root");
Process::ProcessResult result = adbExecCommand(deviceID, "root");
rdcstr whoami = adbExecCommand(deviceID, "shell whoami").strStdout.trimmed();
if(whoami == "root")