Improved sitefiles
This commit is contained in:
13
src/main.c
13
src/main.c
@@ -89,18 +89,18 @@ int main(int argc, char **argv) {
|
||||
fprintf(stderr, "No sitefile configured\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
logs = fopen(logout, "a");
|
||||
if (logs == NULL) {
|
||||
fprintf(stderr, "Couldn't open logs file %s\n", logout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Sitefile *site = parseFile(sitefile);
|
||||
if (site == NULL) {
|
||||
fprintf(stderr, "Invalid sitefile %s\n", sitefile);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
logs = fopen(logout, "a");
|
||||
if (logs == NULL) {
|
||||
fprintf(stderr, "Couldn't open logs file %s\n", logout);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
int *pending = calloc(processes - 1, sizeof(int));
|
||||
int *schedule = malloc(2 * sizeof(int));
|
||||
if (schedule == NULL)
|
||||
@@ -114,6 +114,7 @@ int main(int argc, char **argv) {
|
||||
RunnerArgs *args = malloc(sizeof(RunnerArgs));
|
||||
if (args == NULL)
|
||||
exit(EXIT_FAILURE);
|
||||
args->site = site;
|
||||
args->pending = pending;
|
||||
args->schedule = schedule;
|
||||
args->id = i;
|
||||
|
||||
Reference in New Issue
Block a user