summaryrefslogtreecommitdiff
path: root/tests/libtest/lib525.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-12-25 21:41:14 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-12-26 12:04:25 +0100
commitecbd1fa78dd5dd9a917424264fde259934ae4b59 (patch)
tree1d9ebeab1f083a8794aa646987561dcc438d70c5 /tests/libtest/lib525.c
parentb8ef4a845be8cc2b82f3fbfee23f88b376655c0e (diff)
downloadcurl-ecbd1fa78dd5dd9a917424264fde259934ae4b59.tar.gz
checksrc: detect more kinds of NULL comparisons we avoidbagder/NULL-checks
Co-authored-by: Jay Satiro Closes #8180
Diffstat (limited to 'tests/libtest/lib525.c')
-rw-r--r--tests/libtest/lib525.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index 0826de3f1..1400b9248 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -53,7 +53,7 @@ int test(char *URL)
}
hd_src = fopen(libtest_arg2, "rb");
- if(NULL == hd_src) {
+ if(!hd_src) {
fprintf(stderr, "fopen failed with error: %d (%s)\n",
errno, strerror(errno));
fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);