diff options
author | Donald Sharp <sharpd@nvidia.com> | 2020-09-24 02:36:51 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2020-09-24 02:36:51 +0200 |
commit | 00e0d113e5ffcb69304b8d5d83f0357ec416c6c4 (patch) | |
tree | 9ca2e586daa4a88b41a1e84ae200a4170bca0b67 /zebra/zebra_mlag_private.c | |
parent | Merge pull request #7155 from donaldsharp/TRAP (diff) | |
download | frr-00e0d113e5ffcb69304b8d5d83f0357ec416c6c4.tar.xz frr-00e0d113e5ffcb69304b8d5d83f0357ec416c6c4.zip |
zebra: the mlag_rd_buf_offset variable was write only
The mlag_rd_buf_offset function was only ever being set to 0
in the mlag_read function and only written in that function.
There is no need for this global variable.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_mlag_private.c')
-rw-r--r-- | zebra/zebra_mlag_private.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/zebra/zebra_mlag_private.c b/zebra/zebra_mlag_private.c index 1dae758b1..9c34aa2c3 100644 --- a/zebra/zebra_mlag_private.c +++ b/zebra/zebra_mlag_private.c @@ -76,7 +76,7 @@ static int zebra_mlag_read(struct thread *thread) { uint32_t *msglen; uint32_t h_msglen; - uint32_t tot_len, curr_len = mlag_rd_buf_offset; + uint32_t tot_len, curr_len = 0; zrouter.mlag_info.t_read = NULL; @@ -101,7 +101,6 @@ static int zebra_mlag_read(struct thread *thread) zebra_mlag_handle_process_state(MLAG_DOWN); return -1; } - mlag_rd_buf_offset += data_len; if (data_len != (ssize_t)(ZEBRA_MLAG_LEN_SIZE - curr_len)) { /* Try again later */ zebra_mlag_sched_read(); @@ -139,7 +138,6 @@ static int zebra_mlag_read(struct thread *thread) zebra_mlag_handle_process_state(MLAG_DOWN); return -1; } - mlag_rd_buf_offset += data_len; if (data_len != (ssize_t)(tot_len - curr_len)) { /* Try again later */ zebra_mlag_sched_read(); |