@@ -564,12 +564,13 @@ int redis_cmd_append_sstr_long(smart_str *str, long append) {
564
564
int redis_cmd_append_sstr_dbl (smart_str * str , double value ) {
565
565
char * dbl_str ;
566
566
int dbl_len ;
567
+ int retval ;
567
568
568
569
/// Convert to double
569
570
REDIS_DOUBLE_TO_STRING (dbl_str , dbl_len , value );
570
571
571
572
// Append the string
572
- int retval = redis_cmd_append_sstr (str , dbl_str , dbl_len );
573
+ retval = redis_cmd_append_sstr (str , dbl_str , dbl_len );
573
574
574
575
// Free our double string
575
576
efree (dbl_str );
@@ -583,9 +584,10 @@ int redis_cmd_append_sstr_dbl(smart_str *str, double value) {
583
584
*/
584
585
int redis_cmd_append_int (char * * cmd , int cmd_len , int append ) {
585
586
char int_buf [32 ];
587
+ int int_len ;
586
588
587
589
// Conver to an int, capture length
588
- int int_len = snprintf (int_buf , sizeof (int_buf ), "%d" , append );
590
+ int_len = snprintf (int_buf , sizeof (int_buf ), "%d" , append );
589
591
590
592
// Return the new length
591
593
return redis_cmd_append_str (cmd , cmd_len , int_buf , int_len );
@@ -733,6 +735,10 @@ PHPAPI void redis_client_list_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *red
733
735
char * resp ;
734
736
int resp_len ;
735
737
zval * z_result , * z_sub_result ;
738
+ // Pointers for parsing
739
+ char * p , * lpos , * kpos = NULL , * vpos = NULL , * p2 , * key , * value ;
740
+ // Key length, done flag
741
+ int klen = 0 , done = 0 , is_numeric ;
736
742
737
743
// Make sure we can read a response from Redis
738
744
if ((resp = redis_sock_read (redis_sock , & resp_len TSRMLS_CC )) == NULL ) {
@@ -747,11 +753,8 @@ PHPAPI void redis_client_list_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *red
747
753
ALLOC_INIT_ZVAL (z_sub_result );
748
754
array_init (z_sub_result );
749
755
750
- // Pointers for parsing
751
- char * p = resp , * lpos = resp , * kpos = NULL , * vpos = NULL , * p2 , * key , * value ;
752
-
753
- // Key length, done flag
754
- int klen = 0 , done = 0 , is_numeric ;
756
+ p = resp ;
757
+ lpos = resp ;
755
758
756
759
// While we've got more to parse
757
760
while (!done ) {
0 commit comments