/* 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,
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;