summaryrefslogtreecommitdiffstats
path: root/modules/websocket
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-09-09 17:40:07 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-09-26 16:44:52 +0200
commit517e9f8aefed8925c1b66932a0d3cb887e99d267 (patch)
treee62fccf23a2f155d5c5799aebe5b0837e33c6377 /modules/websocket
parent36945dad0730ee013547493df60c4c59567b4290 (diff)
downloadredot-engine-517e9f8aefed8925c1b66932a0d3cb887e99d267.tar.gz
[Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'modules/websocket')
-rw-r--r--modules/websocket/wsl_peer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/websocket/wsl_peer.cpp b/modules/websocket/wsl_peer.cpp
index a127a6b75a..38cb614847 100644
--- a/modules/websocket/wsl_peer.cpp
+++ b/modules/websocket/wsl_peer.cpp
@@ -600,7 +600,7 @@ ssize_t WSLPeer::_wsl_send_callback(wslay_event_context_ptr ctx, const uint8_t *
}
int WSLPeer::_wsl_genmask_callback(wslay_event_context_ptr ctx, uint8_t *buf, size_t len, void *user_data) {
- ERR_FAIL_COND_V(!_static_rng, WSLAY_ERR_CALLBACK_FAILURE);
+ ERR_FAIL_NULL_V(_static_rng, WSLAY_ERR_CALLBACK_FAILURE);
Error err = _static_rng->get_random_bytes(buf, len);
ERR_FAIL_COND_V(err != OK, WSLAY_ERR_CALLBACK_FAILURE);
return 0;
@@ -676,7 +676,7 @@ void WSLPeer::poll() {
}
if (ready_state == STATE_OPEN || ready_state == STATE_CLOSING) {
- ERR_FAIL_COND(!wsl_ctx);
+ ERR_FAIL_NULL(wsl_ctx);
int err = 0;
if ((err = wslay_event_recv(wsl_ctx)) != 0 || (err = wslay_event_send(wsl_ctx)) != 0) {
// Error close.