From fe7d96e573f216c588ba09989b4e025c94ece523 Mon Sep 17 00:00:00 2001 From: Justin Reichardt Date: Thu, 2 Sep 2021 16:43:27 -0500 Subject: [PATCH] Removed openfile and closefile functions They are not used and so were removed --- src/rhosts.c | 17 ----------------- src/rhosts.h | 2 -- 2 files changed, 19 deletions(-) diff --git a/src/rhosts.c b/src/rhosts.c index 2e87083..2a28c68 100644 --- a/src/rhosts.c +++ b/src/rhosts.c @@ -115,23 +115,6 @@ int parse_config(struct entry **entries){ if (rc != 0){return 1;} return 0; } -int closefile(FILE **file, char *location){ - int rc = 0; - rc = fclose(*file); - if (rc != 0){ - printf("Failed to open %s\n", location); - return errno; - } - return 0; -} -int openfile(FILE **file, char *mode, char *location){ - *file = fopen(location, mode); - if (*file == NULL){ - printf("Failed to open %s\n", location); - return errno; - } - return 0; -} short int determine_config_entry_value(char *buff){ if (strncmp(buff,"#", 1) == 0){return CONTENTTYPE_COMMENT;} else if (strcmp(buff,"site") == 0){return CONTENTTYPE_SITE;} diff --git a/src/rhosts.h b/src/rhosts.h index 3f8bcf5..2863bac 100644 --- a/src/rhosts.h +++ b/src/rhosts.h @@ -57,8 +57,6 @@ struct entry{ int parse_config(struct entry **entries); -int openfile(FILE **file, char *mode, char *location); -int closefile(FILE **file, char *location); short int determine_config_entry_value(char *buff); int preserve_static_entries(); int add_site_entries(struct entry **entries);