Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
bafd8216
Commit
bafd8216
authored
Dec 08, 2014
by
Sun He
Committed by
antirez
Dec 09, 2014
Browse files
sparkline.c: AddSample skip Empty label
parent
6370afc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sparkline.c
View file @
bafd8216
...
@@ -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