From: Simon Ruderich Date: Thu, 8 Aug 2013 16:13:34 +0000 (+0200) Subject: Rename slurp_file() to slurp_text_file(). X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=6c7e972612c7bd8f98308d08c4576064b7cbe4eb;p=tlsproxy%2Ftlsproxy.git Rename slurp_file() to slurp_text_file(). It can only handle text files. --- diff --git a/src/tlsproxy.c b/src/tlsproxy.c index b4becea..3d9e80f 100644 --- a/src/tlsproxy.c +++ b/src/tlsproxy.c @@ -75,7 +75,7 @@ static void sigint_handler(int signal); static void parse_arguments(int argc, char **argv); static void print_usage(const char *argv); -static char *slurp_file(const char *path); +static char *slurp_text_file(const char *path); static void initialize_gnutls(void); static void deinitialize_gnutls(void); @@ -267,7 +267,7 @@ static void parse_arguments(int argc, char **argv) { while ((option = getopt(argc, argv, "a:d:p:t:uh?")) != -1) { switch (option) { case 'a': { - http_digest_authorization = slurp_file(optarg); + http_digest_authorization = slurp_text_file(optarg); if (http_digest_authorization == NULL) { fprintf(stderr, "failed to open authorization file '%s': ", optarg); @@ -445,7 +445,7 @@ static void *worker_thread(void *unused) { return NULL; } -static char *slurp_file(const char *path) { +static char *slurp_text_file(const char *path) { struct stat stat; size_t size_read; char *content = NULL;