]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Pass a dummy process_option_state for dynamic options
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 23 Dec 2022 15:12:53 +0000 (16:12 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 23 Dec 2022 15:15:23 +0000 (16:15 +0100)
The process_option_state is functionally needed during initial parsing
of CLO options.  When later changing them, only changing the CLO
itself is good enough.
But the processing of option needs to have a state.

coregrind/m_main.c

index f02a8b0eb5551e52e5f6885912f3c85f451ca267..2b4a8748ff771ab936e58f0302fb27639db43c8f 100644 (file)
@@ -889,9 +889,9 @@ static void process_option (Clo_Mode mode,
 
 void VG_(process_dynamic_option) (Clo_Mode mode, HChar *value)
 {
-   process_option (mode, value, NULL);
-   // This is not supposed to change values in process_option_state,
-   // so we can give a NULL.
+   struct process_option_state dummy;
+   process_option (mode, value, &dummy);
+   // No need to handle a process_option_state once valgrind has started.
 }
 
 /* Peer at previously set up VG_(args_for_valgrind) and do some