nsim: fix uninitialized variables 91/43491/2
authorMatus Fabian <[email protected]>
Mon, 28 Jul 2025 16:49:35 +0000 (12:49 -0400)
committerFlorin Coras <[email protected]>
Mon, 28 Jul 2025 18:21:24 +0000 (18:21 +0000)
othervise user is not informed of missing parameter and demons fly out
of your nose

Type: fix

Change-Id: I54db587c99f193de1884fd7a0e292ae7128da5d7
Signed-off-by: Matus Fabian <[email protected]>
src/plugins/nsim/nsim.c

index 6339ecf..8b9e1b6 100644 (file)
@@ -696,7 +696,8 @@ static clib_error_t *
 set_nsim_command_fn (vlib_main_t * vm,
                     unformat_input_t * input, vlib_cli_command_t * cmd)
 {
-  f64 drop_fraction = 0.0, reorder_fraction = 0.0, delay, bandwidth;
+  f64 drop_fraction = 0.0, reorder_fraction = 0.0, delay = 0.0,
+      bandwidth = 0.0;
   u32 packets_per_drop, packets_per_reorder, packet_size = 1500;
   nsim_main_t *nsm = &nsim_main;
   int rv;