From 76ad95f5a7601b7e0549a4f4624443287f64a262 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 17 Sep 2011 21:42:52 +0200 Subject: [PATCH] src/connection.c: Minor cleanup. --- src/connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index 0a69f78..700a354 100644 --- a/src/connection.c +++ b/src/connection.c @@ -357,7 +357,7 @@ static int initialize_tls_session_client(int peer_socket, /* The "invalid" hostname is special. If it's used we send an invalid * certificate to let the client know something is wrong. */ - use_invalid_cert = 0 == strcmp(hostname, "invalid"); + use_invalid_cert = (0 == strcmp(hostname, "invalid")); if (0 != proxy_certificate_path(hostname, path, sizeof(path))) { LOG(LOG_ERROR, @@ -512,7 +512,7 @@ static int read_http_request(FILE *client_fd, char *request, size_t length) { return -2; } - while (NULL != fgets(buffer, MAX_REQUEST_LINE, client_fd)) { + while (NULL != fgets(buffer, sizeof(buffer), client_fd)) { /* End of header. */ if (0 == strcmp(buffer, "\n") || 0 == strcmp(buffer, "\r\n")) { break; -- 2.44.1