From: Simon Ruderich Date: Sat, 17 Sep 2011 19:42:52 +0000 (+0200) Subject: src/connection.c: Minor cleanup. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=76ad95f5a7601b7e0549a4f4624443287f64a262;p=tlsproxy%2Ftlsproxy.git src/connection.c: Minor cleanup. --- 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;