mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-22 15:30:09 +00:00
Removed goto
This commit is contained in:
parent
11f9e9cfa2
commit
76bd7bd882
@ -1319,22 +1319,19 @@ int main(int argc, char* argv[])
|
||||
// Output the Banner
|
||||
Banner(argc, argv);
|
||||
|
||||
int ret = 0;
|
||||
int port = 6868;
|
||||
|
||||
if (!InitBus()) {
|
||||
ret = EPERM;
|
||||
goto init_exit;
|
||||
return EPERM;
|
||||
}
|
||||
|
||||
if (!ParseArgument(argc, argv, port)) {
|
||||
ret = EINVAL;
|
||||
goto err_exit;
|
||||
Cleanup();
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!InitService(port)) {
|
||||
ret = EPERM;
|
||||
goto init_exit;
|
||||
return EPERM;
|
||||
}
|
||||
|
||||
// Reset
|
||||
@ -1454,10 +1451,5 @@ int main(int argc, char* argv[])
|
||||
active = false;
|
||||
}
|
||||
|
||||
err_exit:
|
||||
// Cleanup
|
||||
Cleanup();
|
||||
|
||||
init_exit:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user