Skip to content

Commit

Permalink
Fix unsigned compared against 0.
Browse files Browse the repository at this point in the history
Coverity Scan 1431132.
  • Loading branch information
ralight committed Aug 6, 2020
1 parent 872222c commit 9b5112f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ int net__socket_connect(struct mosquitto *mosq, const char *host, uint16_t port,
mosq_sock_t sock = INVALID_SOCKET;
int rc, rc2;

if(!mosq || !host || port < 0) return MOSQ_ERR_INVAL;
if(!mosq || !host) return MOSQ_ERR_INVAL;

rc = net__try_connect(host, port, &sock, bind_address, blocking);
if(rc > 0) return rc;
Expand Down

0 comments on commit 9b5112f

Please sign in to comment.