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
09d2abdc
Commit
09d2abdc
authored
Feb 21, 2011
by
antirez
Browse files
check return value of getcwd()
parent
465b4189
Changes
1
Show whitespace changes
Inline
Side-by-side
src/config.c
View file @
09d2abdc
...
@@ -468,10 +468,12 @@ void configGetCommand(redisClient *c) {
...
@@ -468,10 +468,12 @@ void configGetCommand(redisClient *c) {
if
(
stringmatch
(
pattern
,
"dir"
,
0
))
{
if
(
stringmatch
(
pattern
,
"dir"
,
0
))
{
char
buf
[
1024
];
char
buf
[
1024
];
buf
[
0
]
=
'\0'
;
getcwd
(
buf
,
sizeof
(
buf
));
addReplyBulkCString
(
c
,
"dir"
);
addReplyBulkCString
(
c
,
"dir"
);
if
(
getcwd
(
buf
,
sizeof
(
buf
))
==
NULL
)
{
buf
[
0
]
=
'\0'
;
}
else
{
addReplyBulkCString
(
c
,
buf
);
addReplyBulkCString
(
c
,
buf
);
}
matches
++
;
matches
++
;
}
}
if
(
stringmatch
(
pattern
,
"dbfilename"
,
0
))
{
if
(
stringmatch
(
pattern
,
"dbfilename"
,
0
))
{
...
...
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