summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2019-07-24 22:06:55 -0400
committerDamjan Marion <dmarion@me.com>2019-07-25 09:01:12 +0000
commit8a4f6dadfd56b96a65010d77ed28522c51d0cfa9 (patch)
tree71b32d0d8084f632a4a842985bcb37ea884dde18
parent0dbaa59e075f9ac44b0bd23ed2c9adbd85215e8f (diff)
misc: leverage vlib_buffer_get_current in srp
Type: style Change-Id: I6c57ab3e71c693de5ecfbdfee118d521a8c9a4c2 Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
-rw-r--r--src/vnet/srp/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/srp/node.c b/src/vnet/srp/node.c
index 35121cc61bf..6b7602516ba 100644
--- a/src/vnet/srp/node.c
+++ b/src/vnet/srp/node.c
@@ -402,7 +402,7 @@ srp_control_input (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
- s0 = (void *) (b0->data + b0->current_data);
+ s0 = vlib_buffer_get_current(b0);
l2_len0 = vlib_buffer_length_in_chain (vm, b0);
l3_len0 = l2_len0 - STRUCT_OFFSET_OF (srp_generic_control_header_t, control);