Systemd/coccinelle/safe_close-no-if.cocci

8 lines
88 B
Plaintext

@@
expression fd;
@@
- if (fd >= 0) {
- fd = safe_close(fd);
- }
+ fd = safe_close(fd);