Skip to content

Commit

Permalink
Fix scan-build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed May 8, 2020
1 parent 98499bb commit 215828e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions library.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,10 +728,7 @@ redis_cmd_append_sstr_dbl(smart_string *str, double value)
len = snprintf(tmp, sizeof(tmp), "%.16g", value);

// Append the string
retval = redis_cmd_append_sstr(str, tmp, len);

/* Return new length */
return retval;
return redis_cmd_append_sstr(str, tmp, len);
}

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

*val = NULL;
*val = "";
*val_len = 0;
switch(redis_sock->serializer) {
case REDIS_SERIALIZER_NONE:
Expand Down

0 comments on commit 215828e

Please sign in to comment.