mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
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
This commit is contained in:
@@ -336,7 +336,7 @@ BufFileOpenFileSet(FileSet *fileset, const char *name, int mode,
|
||||
|
||||
file = makeBufFileCommon(nfiles);
|
||||
file->files = files;
|
||||
file->readOnly = (mode == O_RDONLY) ? true : false;
|
||||
file->readOnly = (mode == O_RDONLY);
|
||||
file->fileset = fileset;
|
||||
file->name = pstrdup(name);
|
||||
|
||||
|
Reference in New Issue
Block a user