summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vlib/buffer.c2
-rw-r--r--src/vlib/buffer_serialize.c2
-rw-r--r--src/vnet/srp/node.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 6caca72cf03..3f90f5a0860 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -817,7 +817,7 @@ vlib_buffer_add_data (vlib_main_t * vm,
void *d;
bi = buffer_index;
- if (bi == 0
+ if (bi == ~0
&& 1 != vlib_buffer_alloc_from_free_list (vm, &bi, 1, free_list_index))
goto out_of_buffers;
diff --git a/src/vlib/buffer_serialize.c b/src/vlib/buffer_serialize.c
index 96a5f0a0da8..48dcce3be90 100644
--- a/src/vlib/buffer_serialize.c
+++ b/src/vlib/buffer_serialize.c
@@ -216,7 +216,7 @@ serialize_close_vlib_buffer (serialize_main_t * m)
{
sm->last_buffer
= vlib_buffer_add_data (sm->vlib_main, sm->tx.free_list_index,
- sm->last_buffer == ~0 ? 0 : sm->last_buffer,
+ sm->last_buffer,
s->overflow_buffer,
vec_len (s->overflow_buffer));
_vec_len (s->overflow_buffer) = 0;
diff --git a/src/vnet/srp/node.c b/src/vnet/srp/node.c
index 9123c4c7735..acb770e52c8 100644
--- a/src/vnet/srp/node.c
+++ b/src/vnet/srp/node.c
@@ -334,7 +334,7 @@ srp_topology_packet (vlib_main_t * vm, u32 sw_if_index, u8 ** contents)
u32 bi;
bi = vlib_buffer_add_data (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX,
- /* buffer to append to */ 0,
+ /* buffer to append to */ ~0,
*contents, vec_len (*contents));
b = vlib_get_buffer (vm, bi);
vnet_buffer (b)->sw_if_index[VLIB_RX] = vnet_buffer (b)->sw_if_index[VLIB_TX] = sw_if_index;
@@ -621,7 +621,7 @@ static void tx_ips_packet (srp_interface_t * si,
sizeof (i[0]) - STRUCT_OFFSET_OF (srp_ips_header_t, control)));
bi = vlib_buffer_add_data (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX,
- /* buffer to append to */ 0,
+ /* buffer to append to */ ~0,
i, sizeof (i[0]));
/* FIXME trace. */