mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Set SSL boolean with value rather than int
Shortening an integer to an unsigned char can lead to a situation where the bottom 8 bits of the integer are all zeroes but the integer is actually truthy. Using a ternary operator removes the ambiguity and solves compiler warnings
This commit is contained in:
@@ -8772,7 +8772,7 @@ struct mg_connection *mg_connect_client(
|
||||
__func__,
|
||||
strerror(ERRNO));
|
||||
}
|
||||
conn->client.is_ssl = use_ssl;
|
||||
conn->client.is_ssl = use_ssl ? 1 : 0;
|
||||
(void)pthread_mutex_init(&conn->mutex, NULL);
|
||||
#ifndef NO_SSL
|
||||
if (use_ssl) {
|
||||
|
||||
Reference in New Issue
Block a user