summaryrefslogtreecommitdiff
path: root/lib/csv.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2021-07-06 09:47:41 -0400
committerGitHub <noreply@github.com>2021-07-06 09:47:41 -0400
commitacb4c44ef8da8c1a155184a809647533237adca9 (patch)
tree66c81b756c79ff507088d82ccc2bea4614b3a300 /lib/csv.c
parent4afc3218254264c20b38b32b085b430c34a86c24 (diff)
parente702605d80c26e94681b282d97c726df6c6871da (diff)
Merge pull request #8942 from ton31337/fix/cleanups_2
Another round of cleanup
Diffstat (limited to 'lib/csv.c')
-rw-r--r--lib/csv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/csv.c b/lib/csv.c
index b48b79792e..05b9dbe39e 100644
--- a/lib/csv.c
+++ b/lib/csv.c
@@ -641,7 +641,8 @@ static int get_memory_usage(pid_t pid)
char *vm;
snprintf(status_child, sizeof(status_child), "/proc/%d/status", pid);
- if ((fd = open(status_child, O_RDONLY)) < 0)
+ fd = open(status_child, O_RDONLY);
+ if (fd < 0)
return -1;
read(fd, buf, 4095);