misc: fix issues reported by clang-15
[vpp.git] / src / plugins / srv6-as / node.c
index 6f424fc..4beb8df 100644 (file)
@@ -133,7 +133,7 @@ end_as_processing (vlib_buffer_t * b0,
   /* Make sure next header is valid */
   if (PREDICT_FALSE (hdr_type != IP_PROTOCOL_IPV6 &&
                     hdr_type != IP_PROTOCOL_IP_IN_IP &&
-                    hdr_type != IP_PROTOCOL_IP6_NONXT))
+                    hdr_type != IP_PROTOCOL_IP6_ETHERNET))
     {
       return;
     }
@@ -141,7 +141,7 @@ end_as_processing (vlib_buffer_t * b0,
   /* Remove IP header and extensions */
   vlib_buffer_advance (b0, encap_len);
 
-  if (hdr_type == IP_PROTOCOL_IP6_NONXT)
+  if (hdr_type == IP_PROTOCOL_IP6_ETHERNET)
     {
       /* Set output interface */
       vnet_buffer (b0)->sw_if_index[VLIB_TX] = ls0_mem->sw_if_index_out;
@@ -169,7 +169,6 @@ srv6_as_localsid_fn (vlib_main_t * vm,
 {
   ip6_sr_main_t *sm = &sr_main;
   u32 n_left_from, next_index, *from, *to_next;
-  u32 cnt_packets = 0;
 
   from = vlib_frame_vector_args (frame);
   n_left_from = frame->n_vectors;
@@ -227,8 +226,6 @@ srv6_as_localsid_fn (vlib_main_t * vm,
 
          vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
                                           n_left_to_next, bi0, next0);
-
-         cnt_packets++;
        }
 
       vlib_put_next_frame (vm, node, next_index, n_left_to_next);