mirror of
https://github.com/git/git.git
synced 2026-10-12 03:49:33 +02:00
Just like we allow calling free(E) without checking if E is not NULL, it is safe to call FREE_AND_NULL(E) unconditionally. Signed-off-by: Junio C Hamano <gitster@pobox.com>
38 lines
313 B
Plaintext
38 lines
313 B
Plaintext
@@
|
|
expression E;
|
|
@@
|
|
- if (E)
|
|
(
|
|
free(E);
|
|
|
|
|
commit_list_free(E);
|
|
|
|
|
FREE_AND_NULL(E);
|
|
)
|
|
|
|
@@
|
|
expression E;
|
|
@@
|
|
- free(E);
|
|
+ FREE_AND_NULL(E);
|
|
- E = NULL;
|
|
|
|
@@
|
|
expression E;
|
|
@@
|
|
- if (E)
|
|
- {
|
|
commit_list_free(E);
|
|
E = NULL;
|
|
- }
|
|
|
|
@@
|
|
expression E;
|
|
statement S;
|
|
@@
|
|
- if (E) {
|
|
+ if (E)
|
|
S
|
|
commit_list_free(E);
|
|
- }
|