• 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...
automake_boilerplate.am Loading commit data...
fall_back.c Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
hash.c Loading commit data...
random.c Loading commit data...
round_robin.c Loading commit data...
shard_cfg.c Loading commit data...
shard_cfg.h Loading commit data...
shard_dir.c Loading commit data...
shard_dir.h Loading commit data...
tbl_by.h Loading commit data...
tbl_healthy.h Loading commit data...
tbl_resolve.h Loading commit data...
vdir.c Loading commit data...
vdir.h Loading commit data...
vmod.vcc Loading commit data...
vmod_shard.c Loading commit data...