Eduardo Habkost <ehabk...@redhat.com> writes: > On Thu, Dec 10, 2015 at 05:29:14PM +0100, Markus Armbruster wrote: >> Done with this admittedly crude Coccinelle semantic patch: >> > > Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> > > You can rewrite the semantic patch as: > > @@ > type T; > identifier FUN, RET; > expression list ARGS; > expression ERR, EC; > @@ > ( > - T RET = FUN(ARGS, &ERR); > + T RET = FUN(ARGS, &error_fatal); > | > - RET = FUN(ARGS, &ERR); > + RET = FUN(ARGS, &error_fatal); > | > - FUN(ARGS, &ERR); > + FUN(ARGS, &error_fatal); > ) > - if (ERR != NULL) { > - error_report_err(ERR); > - exit(EC); > - } > > > Coccinelle seems to have some magic to make "LIST," also match > with an empty list.
Same output as my script, except it doesn't mess up zynq_init(). Sold!