diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-10-05 12:24:10 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-10-13 16:02:05 -0400 |
| commit | ca3491262b13f700ee37e985f51447866f64a3b1 (patch) | |
| tree | 9d280172c11dd1515f5d7f78f25187f18f0c1e59 /zebra/zebra_mlag_private.c | |
| parent | ded3e3e39c08996343aa00cf2775933e4ef176c3 (diff) | |
zebra: Isolate mlag_rd_buf_offset to the actual using function
Isolate the mlag_rd_buf_offset variable to the actual used function,
instead of having it a global.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_mlag_private.c')
| -rw-r--r-- | zebra/zebra_mlag_private.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/zebra_mlag_private.c b/zebra/zebra_mlag_private.c index d39b0c0aee..8a66d6de72 100644 --- a/zebra/zebra_mlag_private.c +++ b/zebra/zebra_mlag_private.c @@ -74,6 +74,7 @@ static void zebra_mlag_sched_read(void) static int zebra_mlag_read(struct thread *thread) { + static uint32_t mlag_rd_buf_offset; uint32_t *msglen; uint32_t h_msglen; uint32_t tot_len, curr_len = mlag_rd_buf_offset; @@ -159,6 +160,7 @@ static int zebra_mlag_read(struct thread *thread) /* Register read thread. */ zebra_mlag_reset_read_buffer(); + mlag_rd_buf_offset = 0; zebra_mlag_sched_read(); return 0; } |
