* Ensure all fopen check for NULL (not -1)

* Improve test-perf cycles
This commit is contained in:
Olof hagsand 2020-12-07 09:56:07 +01:00
parent 344dcacf6f
commit e1b94d94d2
20 changed files with 24 additions and 23 deletions

View file

@ -453,7 +453,7 @@ xmldb_readfile(clicon_handle h,
goto done;
}
/* Parse file into internal XML tree from different formats */
if ((fp = fopen(dbfile, "r")) < 0) {
if ((fp = fopen(dbfile, "r")) == NULL) {
clicon_err(OE_UNIX, errno, "open(%s)", dbfile);
goto done;
}