Initialize class/struct variables with default values in modules/
This commit is contained in:
@ -246,7 +246,6 @@ int PacketPeerMbedDTLS::get_max_packet_size() const {
|
||||
|
||||
PacketPeerMbedDTLS::PacketPeerMbedDTLS() {
|
||||
ssl_ctx.instance();
|
||||
status = STATUS_DISCONNECTED;
|
||||
}
|
||||
|
||||
PacketPeerMbedDTLS::~PacketPeerMbedDTLS() {
|
||||
|
||||
@ -44,7 +44,7 @@ private:
|
||||
|
||||
uint8_t packet_buffer[PACKET_BUFFER_SIZE];
|
||||
|
||||
Status status;
|
||||
Status status = STATUS_DISCONNECTED;
|
||||
String hostname;
|
||||
|
||||
Ref<PacketPeerUDP> base;
|
||||
|
||||
@ -76,7 +76,6 @@ void CookieContextMbedTLS::clear() {
|
||||
}
|
||||
|
||||
CookieContextMbedTLS::CookieContextMbedTLS() {
|
||||
inited = false;
|
||||
}
|
||||
|
||||
CookieContextMbedTLS::~CookieContextMbedTLS() {
|
||||
@ -205,7 +204,6 @@ mbedtls_ssl_context *SSLContextMbedTLS::get_context() {
|
||||
}
|
||||
|
||||
SSLContextMbedTLS::SSLContextMbedTLS() {
|
||||
inited = false;
|
||||
}
|
||||
|
||||
SSLContextMbedTLS::~SSLContextMbedTLS() {
|
||||
|
||||
@ -50,7 +50,7 @@ class CookieContextMbedTLS : public Reference {
|
||||
friend class SSLContextMbedTLS;
|
||||
|
||||
protected:
|
||||
bool inited;
|
||||
bool inited = false;
|
||||
mbedtls_entropy_context entropy;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
mbedtls_ssl_cookie_ctx cookie_ctx;
|
||||
@ -65,7 +65,7 @@ public:
|
||||
|
||||
class SSLContextMbedTLS : public Reference {
|
||||
protected:
|
||||
bool inited;
|
||||
bool inited = false;
|
||||
|
||||
static PackedByteArray _read_file(String p_path);
|
||||
|
||||
|
||||
@ -274,7 +274,6 @@ int StreamPeerMbedTLS::get_available_bytes() const {
|
||||
|
||||
StreamPeerMbedTLS::StreamPeerMbedTLS() {
|
||||
ssl_ctx.instance();
|
||||
status = STATUS_DISCONNECTED;
|
||||
}
|
||||
|
||||
StreamPeerMbedTLS::~StreamPeerMbedTLS() {
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
class StreamPeerMbedTLS : public StreamPeerSSL {
|
||||
private:
|
||||
Status status;
|
||||
Status status = STATUS_DISCONNECTED;
|
||||
String hostname;
|
||||
|
||||
Ref<StreamPeer> base;
|
||||
|
||||
Reference in New Issue
Block a user