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:
Diffstat (limited to 'redis.c')
-rw-r--r--redis.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/redis.c b/redis.c
index c2a3d87c..3ed22b63 100644
--- a/redis.c
+++ b/redis.c
@@ -1330,13 +1330,11 @@ PHP_METHOD(Redis, incrByFloat) {
RETURN_FALSE;
}
- // Prefix our key, free it if we have
+ // Prefix key, format command, free old key if necissary
key_free = redis_key_prefix(redis_sock, &key, &key_len TSRMLS_CC);
+ cmd_len = redis_cmd_format_static(&cmd, "INCRBYFLOAT", "sf", key, key_len, val);
if(key_free) efree(key);
- // Format our INCRBYFLOAT command
- cmd_len = redis_cmd_format_static(&cmd, "INCRBYFLOAT", "sf", key, key_len, val);
-
REDIS_PROCESS_REQUEST(redis_sock, cmd, cmd_len);
IF_ATOMIC() {
redis_bulk_double_response(INTERNAL_FUNCTION_PARAM_PASSTHRU, redis_sock, NULL, NULL);