feature/delete-host #5

Manually merged
jacob.windle merged 3 commits from feature/delete-host into master 2020-01-18 12:43:37 +00:00
Showing only changes of commit 91c01dd192 - Show all commits

4
main.c
View File

@ -71,14 +71,14 @@ void modifyHostsFile(char *oldhost, char *newhost, int deleteHost) {
// // Seek to 0
fseek(hostsFile, 0, SEEK_SET);
fclose(hostsFile);
// fclose(hostsFile);
// If this failed, write an error message to stderr
ONFAILED(0, (fwrite(newHostsFile, sizeof(char), sizeof(newHostsFile), hostsFile))) {
fprintf(stderr, "Did not write anything!\n");
}
fprintf(stderr, "New hosts file: \n%s\n", newHostsFile);
// fclose(hostsFile);
fclose(hostsFile);
}