aboutsummaryrefslogtreecommitdiffstats
path: root/linux/Platform.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-09-15 08:00:01 +0200
committerDaniel Lange <DLange@git.local>2020-09-15 08:00:01 +0200
commit8e8165109aca4e3c2a8558653df088d674061c78 (patch)
treed68c91ced3a78c65be9ae262ea84676e73cac68d /linux/Platform.c
parente9302ddfaeaad62b12bdd352958fb194a26f3c74 (diff)
parentf80394a20254938142011855f2954b3f63fe5909 (diff)
downloaddebian_htop-8e8165109aca4e3c2a8558653df088d674061c78.tar.gz
debian_htop-8e8165109aca4e3c2a8558653df088d674061c78.tar.bz2
debian_htop-8e8165109aca4e3c2a8558653df088d674061c78.zip
Update upstream source from tag 'upstream/3.0.2'
Update to upstream version '3.0.2' with Debian dir 26e1b8d7612e50e81b8325506c1ce54f71cba270
Diffstat (limited to 'linux/Platform.c')
-rw-r--r--linux/Platform.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/linux/Platform.c b/linux/Platform.c
index 0f59fed..e82d8f8 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -32,17 +32,6 @@ in the source distribution for its full text.
#include <stdio.h>
#include <stdlib.h>
-/*{
-#include "Action.h"
-#include "MainPanel.h"
-#include "BatteryMeter.h"
-#include "LinuxProcess.h"
-#include "SignalsPanel.h"
-}*/
-
-#ifndef CLAMP
-#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
-#endif
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, (int)M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
@@ -248,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