On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > error_propagate() already ignores local_err==NULL, so there's no > need to check it before calling. > > Coccinelle patch used to perform the changes added to > scripts/coccinelle/error_propagate_null.cocci. > > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> > --- > block.c | 20 +++++-------------- > block/qcow2.c | 4 +--- > block/quorum.c | 4 +--- > block/raw-posix.c | 16 ++++----------- > block/raw_bsd.c | 4 +--- > block/snapshot.c | 4 +--- > blockdev.c | 12 +++--------- > bootdevice.c | 4 +--- > dump.c | 4 +--- > hw/ide/qdev.c | 4 +--- > hw/net/ne2000-isa.c | 4 +--- > hw/s390x/virtio-ccw.c | 28 > +++++++-------------------- > hw/usb/dev-storage.c | 4 +--- > qga/commands-win32.c | 8 ++------ > qom/object.c | 4 +--- > scripts/coccinelle/error_propagate_null.cocci | 10 ++++++++++ > 16 files changed, 41 insertions(+), 93 deletions(-) > create mode 100644 scripts/coccinelle/error_propagate_null.cocci
You can do: git config diff.orderFile /path/to/file and then set up a list of globs in /path/to/file in order to influence your diffs; in my case, I stuck 'scripts/coccinelle/*' near the top of my order file, as I find that to be a more useful part of the patch than the churn from running it. But it doesn't affect patch correctness, just ease of review. Reviewed-by: Eric Blake <ebl...@redhat.com> > +++ b/scripts/coccinelle/error_propagate_null.cocci > @@ -0,0 +1,10 @@ > +// error_propagate() already ignores local_err==NULL, so there's > +// no need to check it before calling. > + > +@@ > +identifier L; > +expression E; > +@@ > +-if (L) { > + error_propagate(E, L); > +-} > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature