main checks for error returns

If parse_config or preserve_static_entries returns an error, main will
report it and close with an error.
stable
Justin Reichardt 2021-08-25 21:31:38 -05:00
parent 9b45bc2382
commit 4766abd773
1 changed files with 9 additions and 1 deletions

View File

@ -17,8 +17,16 @@ int main(int argc, char *argv[]){
rc = openfile(&downloadfile, "w+", TMPDOWNLOADLOCATION);
if (rc != 0){return rc;}
parse_config(&entries);
rc = parse_config(&entries);
if (rc != 0){
printf("%d - parse_config failed",rc);
return rc;
}
rc = preserve_static_entries();
if (rc != 0){
printf("%d - preserve_static_entries failed",rc);
return rc;
}
// Closing files before exiting