Skip to content

Commit 600c0b7

Browse files
php_stream_gets is a char* return, not int
1 parent 486b851 commit 600c0b7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cluster_library.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ static int cluster_send_asking(RedisSock *redis_sock TSRMLS_DC)
748748
}
749749

750750
// Consume the rest of our response
751-
if(php_stream_gets(redis_sock->stream, buf, sizeof(buf)<0)) {
751+
if(!php_stream_gets(redis_sock->stream, buf, sizeof(buf))) {
752752
return -1;
753753
}
754754

@@ -940,7 +940,7 @@ static int cluster_check_response(redisCluster *c, unsigned short slot,
940940
int moved;
941941

942942
// Attempt to read the error
943-
if(php_stream_gets(SLOT_STREAM(c,slot), inbuf, sizeof(inbuf))<0) {
943+
if(!php_stream_gets(SLOT_STREAM(c,slot), inbuf, sizeof(inbuf))) {
944944
return -1;
945945
}
946946

redis_cluster.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ void free_cluster_context(void *object TSRMLS_DC) {
325325
efree(cluster);
326326
}
327327

328-
//
329-
// PHP Methods
330-
//
328+
/*
329+
* PHP Methods
330+
*/
331331

332332
/* Create a RedisCluster Object */
333333
PHP_METHOD(RedisCluster, __construct) {

0 commit comments

Comments
 (0)