Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
2ea4bee6
Commit
2ea4bee6
authored
Apr 29, 2016
by
Hisham Muhammad
Browse files
Merge pull request #486 from mmcco/null-check
Remove needless allocation error conditions
parents
306c5443
1809f4be
Changes
2
Hide whitespace changes
Inline
Side-by-side
darwin/Platform.c
View file @
2ea4bee6
...
...
@@ -280,11 +280,9 @@ char* Platform_getProcessEnv(pid_t pid) {
size_t
size
=
endp
-
p
;
env
=
xMalloc
(
size
+
2
);
if
(
env
)
{
memcpy
(
env
,
p
,
size
);
env
[
size
]
=
0
;
env
[
size
+
1
]
=
0
;
}
memcpy
(
env
,
p
,
size
);
env
[
size
]
=
0
;
env
[
size
+
1
]
=
0
;
}
}
free
(
buf
);
...
...
openbsd/Platform.c
View file @
2ea4bee6
...
...
@@ -265,9 +265,6 @@ void Platform_setSwapValues(Meter* this) {
}
swdev
=
xCalloc
(
nswap
,
sizeof
(
*
swdev
));
if
(
swdev
==
NULL
)
{
return
;
}
rnswap
=
swapctl
(
SWAP_STATS
,
swdev
,
nswap
);
if
(
rnswap
==
-
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