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
hiredis
Commits
1680eaf3
Commit
1680eaf3
authored
Aug 14, 2012
by
Pieter Noordhuis
Browse files
AF_UNIX seems to be more widely accepted than AF_LOCAL
parent
e54def88
Changes
1
Show whitespace changes
Inline
Side-by-side
src/address.c
View file @
1680eaf3
...
@@ -58,7 +58,7 @@ redis_address redis_address_un(const char *path) {
...
@@ -58,7 +58,7 @@ redis_address redis_address_un(const char *path) {
struct
sockaddr_un
sa
;
struct
sockaddr_un
sa
;
memset
(
&
sa
,
0
,
sizeof
(
sa
));
memset
(
&
sa
,
0
,
sizeof
(
sa
));
sa
.
sun_family
=
AF_
LOCAL
;
sa
.
sun_family
=
AF_
UNIX
;
strncpy
((
char
*
)
&
sa
.
sun_path
,
path
,
sizeof
(
sa
.
sun_path
));
strncpy
((
char
*
)
&
sa
.
sun_path
,
path
,
sizeof
(
sa
.
sun_path
));
sa
.
sun_path
[
sizeof
(
sa
.
sun_path
)
-
1
]
=
'\0'
;
sa
.
sun_path
[
sizeof
(
sa
.
sun_path
)
-
1
]
=
'\0'
;
return
redis_address_from_un
(
sa
);
return
redis_address_from_un
(
sa
);
...
...
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