Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a598e089
Commit
a598e089
authored
Dec 08, 2014
by
Sun He
Committed by
antirez
Dec 09, 2014
Browse files
sparkline.c: AddSample skip Empty label
parent
7d480aba
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sparkline.c
View file @
a598e089
...
@@ -63,7 +63,7 @@ struct sequence *createSparklineSequence(void) {
...
@@ -63,7 +63,7 @@ struct sequence *createSparklineSequence(void) {
/* Add a new sample into a sequence. */
/* Add a new sample into a sequence. */
void
sparklineSequenceAddSample
(
struct
sequence
*
seq
,
double
value
,
char
*
label
)
{
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
)
{
if
(
seq
->
length
==
0
)
{
seq
->
min
=
seq
->
max
=
value
;
seq
->
min
=
seq
->
max
=
value
;
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment