sbu-fsl / Metis

Metis: File System Model Checking via Versatile Input and State Exploration (FAST '24)
Apache License 2.0
7 stars 1 forks source link

Remove unnecessary null pointer checks #20

Open elfring opened 1 week ago

elfring commented 1 week ago

An extra null pointer check is not needed in functions like the following.

elfring commented 6 days ago

:thought_balloon: 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);