style fixes

This commit is contained in:
tihmstar 2017-01-02 00:32:30 +01:00
parent d7bc2b6a60
commit 6145a56950

View file

@ -157,7 +157,7 @@ int main(int argc, const char * argv[]) {
}else{ }else{
client.putDeviceIntoRecovery(); client.putDeviceIntoRecovery();
client.waitForNonce(); client.waitForNonce();
info("done\n"); info("Done\n");
} }
goto error; goto error;
} }
@ -206,17 +206,14 @@ int main(int argc, const char * argv[]) {
goto error; goto error;
} }
if (ipsw) { try {
try { res = client.doRestore(ipsw, flags & FLAG_UPDATE);
res = client.doRestore(ipsw, flags & FLAG_UPDATE); } catch (int error) {
} catch (int error) { if (error == -20) error("maybe you forgot -w ?\n");
if (error == -20) error("maybe you forgot -w ?\n"); err = error;
err = error;
}
cout << "Done: restoring "<< (!res ? "succeeded" : "failed")<<"." <<endl;
}else if (flags & FLAG_WAIT){
cout << "Done"<<endl;
} }
cout << "Done: restoring "<< (!res ? "succeeded" : "failed")<<"." <<endl;
error: error:
if (err) cout << "Failed with errorcode="<<err << endl; if (err) cout << "Failed with errorcode="<<err << endl;