• Dridi Boukelmoune's avatar
    Use the TAKE_OBJ_NOTNULL macro where relevant · e6755a5d
    Dridi Boukelmoune authored
    This patch was created using Coccinelle and the following steps:
    
       $ cat >take.cocci <<EOF
       @@
       expression t, f;
       constant m;
       @@
    
       - AN(f);
       - t = *f;
       - *f = NULL;
       - CHECK_OBJ_NOTNULL(t, m);
       + TAKE_OBJ_NOTNULL(t, f, m);
       EOF
       $ spatch --sp-file take.cocci --dir . --in-place
    e6755a5d
vxp.c 4.66 KB