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); diff --git a/openbsd/Platform.c b/openbsd/Platform.c index 251a7136..9273abc0 100644 --- a/openbsd/Platform.c +++ b/openbsd/Platform.c @@ -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) {