From 6c7e972612c7bd8f98308d08c4576064b7cbe4eb Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 8 Aug 2013 18:13:34 +0200 Subject: [PATCH] Rename slurp_file() to slurp_text_file(). It can only handle text files. --- src/tlsproxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.43.2