Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2016-06-02 20:44:57 +0300
committermichael-grunder <michael.grunder@gmail.com>2016-06-02 20:44:57 +0300
commit254319ddb84f19d7296f3e92b3b9c665853189c5 (patch)
tree6a2025a4dce9f618f5b1c0b97bcb98f6ed050566
parent455fffaa46f2b7e412a173ad6ea2825759203467 (diff)
Fix compiler warning
-rw-r--r--cluster_library.c5
-rw-r--r--crc16.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/cluster_library.c b/cluster_library.c
index 248758b4..38e4827a 100644
--- a/cluster_library.c
+++ b/cluster_library.c
@@ -117,7 +117,7 @@ static void
cluster_multibulk_resp_recursive(RedisSock *sock, size_t elements,
clusterReply **element, int *err TSRMLS_DC)
{
- size_t idx = 0;
+ size_t idx = 0, sz;
clusterReply *r;
long len;
char buf[1024];
@@ -138,10 +138,11 @@ cluster_multibulk_resp_recursive(RedisSock *sock, size_t elements,
switch(r->type) {
case TYPE_ERR:
case TYPE_LINE:
- if(redis_sock_gets(sock, buf, sizeof(buf), &r->len) < 0) {
+ if(redis_sock_gets(sock, buf, sizeof(buf), &sz) < 0) {
*err = 1;
return;
}
+ r->len = (long long)sz;
break;
case TYPE_INT:
r->integer = len;
diff --git a/crc16.h b/crc16.h
index f7d2aee3..be91ffa0 100644
--- a/crc16.h
+++ b/crc16.h
@@ -78,7 +78,7 @@ static const uint16_t crc16tab[256]= {
0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0
};
-static uint16_t crc16(const char *buf, int len) {
+static inline uint16_t crc16(const char *buf, int len) {
int counter;
uint16_t crc = 0;
for (counter = 0; counter < len; counter++)