summaryrefslogtreecommitdiff
path: root/src/backend/jit
diff options
context:
space:
mode:
authorMichael Paquier2021-09-08 00:44:04 +0000
committerMichael Paquier2021-09-08 00:44:04 +0000
commitfd0625c7a9c679c0c1e896014b8f49a489c3a245 (patch)
treecacddafcd64a4f00d87f6551b29937f9e5ced415 /src/backend/jit
parentd6c916f020e291b45563d4e76a649e9364cb6f2d (diff)
Clean up some code using "(expr) ? true : false"
All the code paths simplified here were already using a boolean or used an expression that led to zero or one, making the extra bits unnecessary. Author: Justin Pryzby Reviewed-by: Tom Lane, Michael Paquier, Peter Smith Discussion: https://postgr.es/m/20210428182936.GE27406@telsasoft.com
Diffstat (limited to 'src/backend/jit')
-rw-r--r--src/backend/jit/jit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/jit/jit.c b/src/backend/jit/jit.c
index 2da300e000d..91b8ae6c51a 100644
--- a/src/backend/jit/jit.c
+++ b/src/backend/jit/jit.c
@@ -198,7 +198,7 @@ file_exists(const char *name)
AssertArg(name != NULL);
if (stat(name, &st) == 0)
- return S_ISDIR(st.st_mode) ? false : true;
+ return !S_ISDIR(st.st_mode);
else if (!(errno == ENOENT || errno == ENOTDIR))
ereport(ERROR,
(errcode_for_file_access(),