Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Low: read_config: unify jump labels (parsing: err, after: out)
This is a preparation work for a subsequent commit
"Low: read_config: close config file when no longer needed".
  • Loading branch information
jnpkrn committed May 12, 2016
commit f436cba56ca0ec6119f31aa9fb3a2e1880092a6e
12 changes: 6 additions & 6 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,13 +655,13 @@ int read_config(const char *path, int type)

if (strcmp(key, "site") == 0) {
if (add_site(val, SITE))
goto out;
goto err;
continue;
}

if (strcmp(key, "arbitrator") == 0) {
if (add_site(val, ARBITRATOR))
goto out;
goto err;
continue;
}

Expand Down Expand Up @@ -695,13 +695,13 @@ int read_config(const char *path, int type)
if (strcmp(key, "ticket") == 0) {
if (current_tk && strcmp(current_tk->name, "__defaults__")) {
if (!postproc_ticket(current_tk)) {
goto out;
goto err;
}
}
if (!strcmp(val, "__defaults__")) {
current_tk = &defaults;
} else if (add_ticket(val, &current_tk, &defaults)) {
goto out;
goto err;
}
continue;
}
Expand Down Expand Up @@ -781,7 +781,7 @@ int read_config(const char *path, int type)

if (strcmp(key, "weights") == 0) {
if (parse_weights(val, current_tk->weight) < 0)
goto out;
goto err;
continue;
}

Expand All @@ -802,7 +802,7 @@ int read_config(const char *path, int type)
cp2 = cp + strlen(cp);
if (cp2-cp >= BOOTH_NAME_LEN) {
log_error("booth config file name too long");
goto err;
goto out;
}
strncpy(booth_conf->name, cp, cp2-cp);
*(booth_conf->name+(cp2-cp)) = '\0';
Expand Down