diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-29 13:43:16 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-29 21:27:49 +0200 |
commit | 0e2d70760d8422e38dd4d6f8ceed2b960b0ed433 (patch) | |
tree | 4a4a7dfb21d429485b7245bc6a869b6c83bef152 /lib/csv.c | |
parent | bgpd: Avoid using assignments within checks (diff) | |
download | frr-0e2d70760d8422e38dd4d6f8ceed2b960b0ed433.tar.xz frr-0e2d70760d8422e38dd4d6f8ceed2b960b0ed433.zip |
lib: Avoid using assignments within checks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/csv.c')
-rw-r--r-- | lib/csv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |