Skip to content

Commit

Permalink
Avoid a coverty warning for failure to check return value.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-grunder committed Aug 15, 2017
1 parent 77aebad commit af71d42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1467,10 +1467,11 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock TSRMLS_DC)
return -1;
}

/* Attempt to set TCP_NODELAY if we're not using a unix socket */
/* Attempt to set TCP_NODELAY if we're not using a unix socket. */
sock = (php_netstream_data_t*)redis_sock->stream->abstract;
if (!usocket) {
setsockopt(sock->socket, IPPROTO_TCP, TCP_NODELAY, (char *) &tcp_flag, sizeof(int));
err = setsockopt(sock->socket, IPPROTO_TCP, TCP_NODELAY, (char *) &tcp_flag, sizeof(int));
PHPREDIS_NOTUSED(err);
}

php_stream_auto_cleanup(redis_sock->stream);
Expand Down

0 comments on commit af71d42

Please sign in to comment.