• 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...
daemon.c Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
generate.py Loading commit data...
libvarnishapi.map Loading commit data...
vsc.c Loading commit data...
vsig.c Loading commit data...
vsl.c Loading commit data...
vsl2rst.c Loading commit data...
vsl_api.h Loading commit data...
vsl_arg.c Loading commit data...
vsl_cursor.c Loading commit data...
vsl_dispatch.c Loading commit data...
vsl_glob_test.c Loading commit data...
vsl_query.c Loading commit data...
vsm.c Loading commit data...
vut.c Loading commit data...
vxp.c Loading commit data...
vxp.h Loading commit data...
vxp_lexer.c Loading commit data...
vxp_parse.c Loading commit data...
vxp_test.c Loading commit data...