mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
sparkline.c: AddSample skip Empty label
This commit is contained in:
parent
c87a37661e
commit
07a9e44b86
@ -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