mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-25 10:28:11 +02:00
Same as earlier commit, except for "FREE"
This patch has been generated by the following Coccinelle semantic
patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it
@@
expression E;
@@
+ FREE (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- FREE(E);
(
- E = NULL;
|
- E = 0;
)
...
- }
@@
expression E;
type T;
@@
+ FREE ((T) E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- FREE((T) E);
(
- E = NULL;
|
- E = 0;
)
...
- }
@@
expression E;
@@
+ FREE (E);
- if (unlikely (E != NULL)) {
- FREE (E);
- }
@@
expression E;
type T;
@@
+ FREE ((T) E);
- if (unlikely (E != NULL)) {
- FREE ((T) E);
- }
Reviewed-by: Brian Paul <brianp@vmware.com>
|
||
|---|---|---|
| .. | ||
| cso_cache | ||
| draw | ||
| gallivm | ||
| indices | ||
| os | ||
| pipe-loader | ||
| pipebuffer | ||
| postprocess | ||
| rbug | ||
| rtasm | ||
| target-helpers | ||
| tgsi | ||
| translate | ||
| util | ||
| vl | ||
| Android.mk | ||
| Makefile | ||
| Makefile.sources | ||
| SConscript | ||