diff options
author | Sun He <sunheehnus@gmail.com> | 2014-12-08 11:43:32 +0800 |
---|---|---|
committer | Sun He <sunheehnus@gmail.com> | 2014-12-08 11:43:32 +0800 |
commit | 07a9e44b86eff660e55bc1044a667eda7b981973 (patch) | |
tree | ac5d9e071821ef67cb8ede591d02ec01cf9538fa /src/sparkline.c | |
parent | c87a37661e14b288d2510b3e4de088a3fed3e5c0 (diff) | |
download | redis-07a9e44b86eff660e55bc1044a667eda7b981973.tar.gz |
sparkline.c: AddSample skip Empty label
Diffstat (limited to 'src/sparkline.c')
-rw-r--r-- | src/sparkline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sparkline.c b/src/sparkline.c index 3355a598c..8e2764aee 100644 --- a/src/sparkline.c +++ b/src/sparkline.c @@ -63,7 +63,7 @@ struct sequence *createSparklineSequence(void) { /* Add a new sample into a sequence. */ void sparklineSequenceAddSample(struct sequence *seq, double value, char *label) { - label = label == NULL ? label : zstrdup(label); + label = (label == NULL || label[0] == '\0') ? NULL : zstrdup(label); if (seq->length == 0) { seq->min = seq->max = value; } else { |