Return Error Codes Bad Code: void perform_backup(char* from_file, char* to_file) { FILE* f_from = fopen(from_file, "r"); if (f_from) { FILE* f_to = fopen(to_file, "w"); if (f_to) { copy_file(f_from, f_to); fclose(f_from); fclose(f_to); } } } Good Code: int perform_backup(char* from_file, char* to_file) { int success = 0; /* assume failure. */ FILE* f_from = fopen(from_file, "r"); if (f_from) { FILE* f_to = fopen(to_file, "w"); if (f_to) { success = copy_file(f_from, f_to); fclose(f_from); fclose(f_to); } } return success; }