> yourtch@ayourtch-lnx:~/cocci$ diff -c patch-old.cocci patch-new.cocci > *** patch-old.cocci 2021-07-22 22:41:19.516957878 +0200 > --- patch-new.cocci 2021-07-22 22:41:52.625184341 +0200 > *************** > *** 3,8 **** > --- 3,9 ---- > fresh identifier LAIN = "line_" ## AIN; > > statement S1; > + expression exp; > > typedef clib_error_t, vlib_main_t, unformat_input_t, vlib_cli_command_t; > @@ > *************** > *** 20,30 **** > - while (unformat_check_input (AIN) != UNFORMAT_END_OF_INPUT) > + while (unformat_check_input (LAIN) != UNFORMAT_END_OF_INPUT) > S1 > ! <... > - return ERR; > + e = ERR; > + goto done; > ! ...> > +done: > + unformat_free(LAIN); > + return e; > --- 21,32 ---- > - while (unformat_check_input (AIN) != UNFORMAT_END_OF_INPUT) > + while (unformat_check_input (LAIN) != UNFORMAT_END_OF_INPUT) > S1 > ! <... when != true exp > ! when exists > - return ERR; > + e = ERR; > + goto done; > ! ...> > +done: > + unformat_free(LAIN); > + return e; > ayourtch@ayourtch-lnx:~/cocci$ > > And the result was the same...
My trick doesn't work because the return of interest is under a switch, where there is no test expression that has the value true or false. I will see if something else can be done. julia _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci