[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Remove unnecessary checks before calls of the function “free”
From: |
Markus Elfring |
Subject: |
Remove unnecessary checks before calls of the function “free” |
Date: |
Sat, 29 Oct 2022 14:20:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 |
Hello,
The function “free” is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
https://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first
This issue can be fixed also by using the software “Coccinelle 1.1.1”.
Regards,
Markus
delete_if-adjusted-git-20221029.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Remove unnecessary checks before calls of the function “free”,
Markus Elfring <=