Sitelet https://github.com/phpredis/phpredis/commit/af71d4
Skip to content

Commit af71d42

Browse files
Avoid a coverty warning for failure to check return value.
1 parent 77aebad commit af71d42

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎library.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,10 +1467,11 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock TSRMLS_DC)
14671467
return -1;
14681468
}
14691469

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

14761477
php_stream_auto_cleanup(redis_sock->stream);

0 commit comments

Comments
 (0)