git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidying
[exim.git]
/
src
/
src
/
lookups
/
lf_check_file.c
diff --git
a/src/src/lookups/lf_check_file.c
b/src/src/lookups/lf_check_file.c
index 5c74816ef2a9ffe43e8af966b9f7feef655ce06c..c4c05e44def10e5cd4d8f391be512247faaf5cf4 100644
(file)
--- a/
src/src/lookups/lf_check_file.c
+++ b/
src/src/lookups/lf_check_file.c
@@
-45,8
+45,7
@@
lf_check_file(int fd, const uschar * filename, int s_type, int modemask,
{
struct stat statbuf;
{
struct stat statbuf;
-if ((fd >= 0 && fstat(fd, &statbuf) != 0) ||
- (fd < 0 && Ustat(filename, &statbuf) != 0))
+if ((fd < 0 ? Ustat(filename, &statbuf) : fstat(fd, &statbuf)) != 0)
{
int save_errno = errno;
*errmsg = string_sprintf("%s: stat failed", filename);
{
int save_errno = errno;
*errmsg = string_sprintf("%s: stat failed", filename);
@@
-80,7
+79,7
@@
if ((statbuf.st_mode & modemask) != 0)
return +1;
}
return +1;
}
-if (owners
!= NULL
)
+if (owners)
{
BOOL uid_ok = FALSE;
for (int i = 1; i <= (int)owners[0]; i++)
{
BOOL uid_ok = FALSE;
for (int i = 1; i <= (int)owners[0]; i++)
@@
-94,7
+93,7
@@
if (owners != NULL)
}
}
}
}
-if (owngroups
!= NULL
)
+if (owngroups)
{
BOOL gid_ok = FALSE;
for (int i = 1; i <= (int)owngroups[0]; i++)
{
BOOL gid_ok = FALSE;
for (int i = 1; i <= (int)owngroups[0]; i++)