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
3ccc17a4
Commit
3ccc17a4
authored
Jul 24, 2013
by
antirez
Browse files
Ignore sdsrange return value.
parent
6ea8e094
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util.c
View file @
3ccc17a4
...
...
@@ -438,7 +438,7 @@ sds getAbsolutePath(char *filename) {
while
(
sdslen
(
relpath
)
>=
3
&&
relpath
[
0
]
==
'.'
&&
relpath
[
1
]
==
'.'
&&
relpath
[
2
]
==
'/'
)
{
relpath
=
sdsrange
(
relpath
,
3
,
-
1
);
sdsrange
(
relpath
,
3
,
-
1
);
if
(
sdslen
(
abspath
)
>
1
)
{
char
*
p
=
abspath
+
sdslen
(
abspath
)
-
2
;
int
trimlen
=
1
;
...
...
@@ -447,7 +447,7 @@ sds getAbsolutePath(char *filename) {
p
--
;
trimlen
++
;
}
abspath
=
sdsrange
(
abspath
,
0
,
-
(
trimlen
+
1
));
sdsrange
(
abspath
,
0
,
-
(
trimlen
+
1
));
}
}
...
...
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