Use early break instead of large if

This commit is contained in:
Diadlo 2017-06-21 23:14:25 +03:00
commit 21c4b99e1b
No known key found for this signature in database
GPG key ID: 5AF9F2E29107C727

View file

@ -450,7 +450,11 @@ void help_bfg() {
void module_usage() {
int find = 0;
if (hydra_options.service) {
if (!hydra_options.service) {
printf("The Module %s does not need or support optional parameters\n", hydra_options.service);
exit(0);
}
printf("\nHelp for module %s:\n============================================================================\n", hydra_options.service);
if ((strcmp(hydra_options.service, "oracle") == 0) || (strcmp(hydra_options.service, "ora") == 0)) {
printf("Module oracle / ora is optionally taking the ORACLE SID, default is \"ORCL\"\n\n");
@ -674,7 +678,7 @@ void module_usage() {
"For example: \"/secret\" or \"http://bla.com/foo/bar\" or \"https://test.com:8080/members\"\n\n", hydra_options.service);
find = 1;
}
}
if (!find) // this is also printed if the module does not exist at all
printf("The Module %s does not need or support optional parameters\n", hydra_options.service);
exit(0);