summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <natoscott@users.noreply.github.com>2020-09-15 09:21:46 +1000
committerGitHub <noreply@github.com>2020-09-15 09:21:46 +1000
commitf6662f97fdfa6f18a9be9504018158f1353d4cd9 (patch)
treed62744d2f1159710b7ce34d654d38e8b78f967d6
parentccf0960d5cd1d343d7fab864f2bc1509ef332ddd (diff)
parentd5eb72e64d2fbacb2b7045a07468b6bb1b8435a2 (diff)
Merge pull request #120 from cgzones/null
Drop always true condition
-rw-r--r--linux/Platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/Platform.c b/linux/Platform.c
index ffe5c5c2..e82d8f88 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -237,7 +237,7 @@ char* Platform_getProcessEnv(pid_t pid) {
if (fd) {
size_t capacity = 4096, size = 0, bytes;
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;
capacity *= 2;
env = xRealloc(env, capacity);

© 2014-2024 Faster IT GmbH | imprint | privacy policy