mirror of
https://github.com/fluencelabs/redis
synced 2025-05-28 09:41:19 +00:00
sparkline.c: AddSample skip Empty label
This commit is contained in:
parent
6370afc281
commit
bafd82167b
@ -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