mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
coverity: ss: mqtt: remove needless wsi check
881 case LWS_CALLBACK_MQTT_UNSUBSCRIBE_TIMEOUT: >>> CID 392688: (REVERSE_INULL) >>> Null-checking "wsi" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 882 if (!wsi || !wsi->mqtt) 883 return -1; wsi can't be NULL for a callback specific to a wsi.
This commit is contained in:
parent
71db363fe4
commit
310abddf5e
1 changed files with 2 additions and 2 deletions
|
@ -879,7 +879,7 @@ secstream_mqtt(struct lws *wsi, enum lws_callback_reasons reason, void *user,
|
|||
}
|
||||
|
||||
case LWS_CALLBACK_MQTT_UNSUBSCRIBE_TIMEOUT:
|
||||
if (!wsi || !wsi->mqtt)
|
||||
if (!wsi->mqtt)
|
||||
return -1;
|
||||
|
||||
if (wsi->mqtt->inside_shadow) {
|
||||
|
@ -899,7 +899,7 @@ secstream_mqtt(struct lws *wsi, enum lws_callback_reasons reason, void *user,
|
|||
break;
|
||||
|
||||
case LWS_CALLBACK_MQTT_SHADOW_TIMEOUT:
|
||||
if (!wsi || !wsi->mqtt)
|
||||
if (!wsi->mqtt)
|
||||
return -1;
|
||||
|
||||
if (wsi->mqtt->inside_shadow) {
|
||||
|
|
Loading…
Add table
Reference in a new issue