diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-29 14:43:16 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-29 22:27:49 +0300 |
| commit | 0e2d70760d8422e38dd4d6f8ceed2b960b0ed433 (patch) | |
| tree | 4a4a7dfb21d429485b7245bc6a869b6c83bef152 /lib/zclient.c | |
| parent | 11dbcdd35ccf9b9978a61f6f501ab9062c9e5687 (diff) | |
lib: Avoid using assignments within checks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index 4a70881b57..195ec589d3 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -3798,7 +3798,8 @@ static int zclient_read(struct thread *thread) zclient->t_read = NULL; /* Read zebra header (if we don't have it already). */ - if ((already = stream_get_endp(zclient->ibuf)) < ZEBRA_HEADER_SIZE) { + already = stream_get_endp(zclient->ibuf); + if (already < ZEBRA_HEADER_SIZE) { ssize_t nbyte; if (((nbyte = stream_read_try(zclient->ibuf, zclient->sock, ZEBRA_HEADER_SIZE - already)) @@ -3811,7 +3812,6 @@ static int zclient_read(struct thread *thread) return zclient_failed(zclient); } if (nbyte != (ssize_t)(ZEBRA_HEADER_SIZE - already)) { - /* Try again later. */ zclient_event(ZCLIENT_READ, zclient); return 0; } |
