• Dridi Boukelmoune's avatar
    Kill redundant redundant null checks · 2ce13cf2
    Dridi Boukelmoune authored
    I caught one during a review and figured I might as well sweep the whole
    tree, so this patch was created using Coccinelle and the following steps:
    
        $ cat >check_obj.cocci <<EOF
        @@
        expression obj, magic;
        @@
    
        if (obj != NULL) {
        - CHECK_OBJ_NOTNULL(obj, magic);
        + CHECK_OBJ(obj, magic);
        ...
        }
        EOF
        $ spatch --dir . --in-place --sp-file check_obj.cocci
    
    This is my fourth semantic patch, I wouldn't mind checking them in to
    have them handy in the repo to semi-automate code polish every now and
    then. For example in a /tools/cocci directory. This way people could
    study them or use them in their out-of-tree projects like VMODs or VUTs.
    2ce13cf2
Name
Last commit
Last update
..
Makefile.am Loading commit data...
binary_heap.c Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
vas.c Loading commit data...
vav.c Loading commit data...
vcli_proto.c Loading commit data...
vcli_serve.c Loading commit data...
vct.c Loading commit data...
verrno.c Loading commit data...
version.c Loading commit data...
vev.c Loading commit data...
vfil.c Loading commit data...
vfl.c Loading commit data...
vin.c Loading commit data...
vjsn.c Loading commit data...
vlu.c Loading commit data...
vmb.c Loading commit data...
vnum.c Loading commit data...
vpf.c Loading commit data...
vre.c Loading commit data...
vrnd.c Loading commit data...
vsa.c Loading commit data...
vsb.c Loading commit data...
vsha256.c Loading commit data...
vss.c Loading commit data...
vsub.c Loading commit data...
vtcp.c Loading commit data...
vtim.c Loading commit data...
vus.c Loading commit data...