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/network.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/network.c')
-rw-r--r-- | lib/network.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/network.c b/lib/network.c index 411661a5e..b60ad9a57 100644 --- a/lib/network.c +++ b/lib/network.c @@ -78,7 +78,8 @@ int set_nonblocking(int fd) /* According to the Single UNIX Spec, the return value for F_GETFL should never be negative. */ - if ((flags = fcntl(fd, F_GETFL)) < 0) { + flags = fcntl(fd, F_GETFL); + if (flags < 0) { flog_err(EC_LIB_SYSTEM_CALL, "fcntl(F_GETFL) failed for fd %d: %s", fd, safe_strerror(errno)); |