mirror of
https://github.com/fluencelabs/redis
synced 2025-05-02 14:02:14 +00:00
sparkline.c: AddSample skip Empty label
This commit is contained in:
parent
7d480abab4
commit
a598e0894b
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user