Merge pull request #120 from cgzones/null

Drop always true condition
This commit is contained in:
Nathan Scott 2020-09-15 09:21:46 +10:00 committed by GitHub
commit f6662f97fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ char* Platform_getProcessEnv(pid_t pid) {
if (fd) { if (fd) {
size_t capacity = 4096, size = 0, bytes; size_t capacity = 4096, size = 0, bytes;
env = xMalloc(capacity); env = xMalloc(capacity);
while (env && (bytes = fread(env+size, 1, capacity-size, fd)) > 0) { while ((bytes = fread(env+size, 1, capacity-size, fd)) > 0) {
size += bytes; size += bytes;
capacity *= 2; capacity *= 2;
env = xRealloc(env, capacity); env = xRealloc(env, capacity);