diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-09-15 12:29:46 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-09-17 21:44:27 +0200 |
commit | 37921382f49c34738207146d84d1258e2fe0b88d (patch) | |
tree | c2ab0f9d886465d9f2aa2af45d21af50be9d9131 /linux/Platform.c | |
parent | 1efddaf1e5a8da0406f336c85491f2fd720d6860 (diff) |
Use PROCDIR throughout instead of /proc on Linux
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index e82d8f88..0545fc46 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -230,8 +230,8 @@ void Platform_setZfsCompressedArcValues(Meter* this) { ZfsCompressedArcMeter_readStats(this, &(lpl->zfs)); } char* Platform_getProcessEnv(pid_t pid) { - char procname[32+1]; - xSnprintf(procname, 32, "/proc/%d/environ", pid); + char procname[128]; + xSnprintf(procname, sizeof(procname), PROCDIR "/%d/environ", pid); FILE* fd = fopen(procname, "r"); char *env = NULL; if (fd) { |