mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
![Elia Pinto](/assets/img/avatar_default.png)
Add a coccinelle semantic patch necessary to reinforce the git coding style guideline: "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
31 lines
218 B
Plaintext
31 lines
218 B
Plaintext
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
@@
|
|
expression e;
|
|
statement s;
|
|
@@
|
|
if (
|
|
(
|
|
!e
|
|
|
|
|
- e == NULL
|
|
+ !e
|
|
)
|
|
)
|
|
{...}
|
|
else s
|
|
|
|
@@
|
|
expression e;
|
|
statement s;
|
|
@@
|
|
if (
|
|
(
|
|
e
|
|
|
|
|
- e != NULL
|
|
+ e
|
|
)
|
|
)
|
|
{...}
|
|
else s
|