x11vnc icon indicating copy to clipboard operation
x11vnc copied to clipboard

Remove unnecessary null pointer checks

Open elfring opened this issue 3 years ago • 0 comments

Extra null pointer checks are not needed in functions like the following.

💭 I am curious if another software developer (besides me) can get into the mood to apply a corresponding update suggestion which could be generated by the software “Coccinelle” (also with the help of a variant from the following script).

@Remove_unnecessary_pointer_checks@
expression x;
@@
-if (\(x != 0 \| x != NULL\))
    free(x);

elfring avatar Jul 01 '22 09:07 elfring