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
dd80fedf
Commit
dd80fedf
authored
Apr 11, 2017
by
antirez
Browse files
Fix zmalloc_get_memory_size() ifdefs to actually use the else branch.
Close #3927.
parent
697d3abe
Changes
1
Show whitespace changes
Inline
Side-by-side
src/zmalloc.c
View file @
dd80fedf
...
@@ -413,8 +413,6 @@ size_t zmalloc_get_memory_size(void) {
...
@@ -413,8 +413,6 @@ size_t zmalloc_get_memory_size(void) {
if
(
sysctl
(
mib
,
2
,
&
size
,
&
len
,
NULL
,
0
)
==
0
)
if
(
sysctl
(
mib
,
2
,
&
size
,
&
len
,
NULL
,
0
)
==
0
)
return
(
size_t
)
size
;
return
(
size_t
)
size
;
return
0L
;
/* Failed? */
return
0L
;
/* Failed? */
#endif
/* sysctl and sysconf variants */
#else
#else
return
0L
;
/* Unknown OS. */
return
0L
;
/* Unknown OS. */
#endif
#endif
...
...
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