diff options
author | Alejandro Colomar <alx@kernel.org> | 2023-04-21 11:29:12 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-04-21 11:29:54 +0200 |
commit | efbe9863a28dc094f40201c737a1a4927c062b5b (patch) | |
tree | b87ac4ee55fa34b8ba43141737d1e5218727b559 /man3const | |
parent | 8af0181362a655ff23eef82558d5c5be63b1d793 (diff) |
EXIT_SUCCESS.3const: EXAMPLES: Do not use assignment in if condition
Reported-by: checkpatch(1) (`make lint-c-checkpatch`)
Reported-by: Ahelenia ZiemiaĆska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man3const')
-rw-r--r-- | man3const/EXIT_SUCCESS.3const | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/man3const/EXIT_SUCCESS.3const b/man3const/EXIT_SUCCESS.3const index fd3595f83..431f43bbb 100644 --- a/man3const/EXIT_SUCCESS.3const +++ b/man3const/EXIT_SUCCESS.3const @@ -43,7 +43,8 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } - if ((fp = fopen(argv[1], "r")) == NULL) { + fp = fopen(argv[1], "r"); + if (fp == NULL) { perror(argv[1]); exit(EXIT_FAILURE); } |