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