Removed goto

This commit is contained in:
Uwe Seimet 2021-08-30 14:39:26 +02:00
parent 11f9e9cfa2
commit 76bd7bd882

View File

@ -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;
}