diff options
author | Michael McConville <mmcco@mykolab.com> | 2016-04-29 21:10:05 -0400 |
---|---|---|
committer | Michael McConville <mmcco@mykolab.com> | 2016-04-29 21:10:05 -0400 |
commit | 1809f4be984bed50e14778c284f2acbe87652e68 (patch) | |
tree | f9f522b9814e953d7901ca438a466a8f9ea55712 /darwin | |
parent | 306c5443ae0aec17c26f194ef624b6c4cc5b30de (diff) |
Remove needless allocation error conditions
These allocations were converted to use xMalloc et al. and no longer
need error checks.
Diffstat (limited to 'darwin')
-rw-r--r-- | darwin/Platform.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/darwin/Platform.c b/darwin/Platform.c index 303b6c15..9274d0d8 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -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); |