32 lines
922 B
Diff
32 lines
922 B
Diff
From 7f270fb10183cfbe1e6b355da5f75d39f282a984 Mon Sep 17 00:00:00 2001
|
|
From: yinyongkang <yinyongkang@kylinos.cn>
|
|
Date: Fri, 19 Apr 2024 16:11:28 +0800
|
|
Subject: [PATCH] silence a -Wint-in-bool-context warning
|
|
|
|
---
|
|
src/physfs.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/physfs.c b/src/physfs.c
|
|
index fdb1405..5e7bc29 100644
|
|
--- a/src/physfs.c
|
|
+++ b/src/physfs.c
|
|
@@ -920,12 +920,12 @@ static DirHandle *openDirectory(PHYSFS_Io *io, const char *d, int forWriting)
|
|
retval = tryOpenDir(io, *i, d, forWriting, &claimed);
|
|
} /* else */
|
|
|
|
- errcode = currentErrorCode();
|
|
+ errcode = claimed ? currentErrorCode() : PHYSFS_ERR_UNSUPPORTED;
|
|
|
|
if ((!retval) && (created_io))
|
|
io->destroy(io);
|
|
|
|
- BAIL_IF(!retval, claimed ? errcode : PHYSFS_ERR_UNSUPPORTED, NULL);
|
|
+ BAIL_IF(!retval, errcode, NULL);
|
|
return retval;
|
|
} /* openDirectory */
|
|
|
|
--
|
|
2.41.0
|
|
|