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

Commit 215828e

Browse files
committed
Fix scan-build warning
1 parent 98499bb commit 215828e

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎library.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -728,10 +728,7 @@ redis_cmd_append_sstr_dbl(smart_string *str, double value)
728728
len = snprintf(tmp, sizeof(tmp), "%.16g", value);
729729

730730
// Append the string
731-
retval = redis_cmd_append_sstr(str, tmp, len);
732-
733-
/* Return new length */
734-
return retval;
731+
return redis_cmd_append_sstr(str, tmp, len);
735732
}
736733

737734
/* Append a zval to a redis command. The value will be serialized if we are
@@ -2400,7 +2397,7 @@ redis_serialize(RedisSock *redis_sock, zval *z, char **val, size_t *val_len
24002397
uint8_t *val8;
24012398
#endif
24022399

2403-
*val = NULL;
2400+
*val = "";
24042401
*val_len = 0;
24052402
switch(redis_sock->serializer) {
24062403
case REDIS_SERIALIZER_NONE:

0 commit comments

Comments
 (0)