* Exim - an Internet mail transport agent *
*************************************************/
+/* Copyright (c) The Exim Maintainers 2020 - 2023 */
/* Copyright (c) University of Cambridge 1995 - 2009 */
-/* Copyright (c) The Exim Maintainers 2020 */
/* See the file NOTICE for conditions of use and distribution. */
-/* SPDX-License-Identifier: GPL-2.0-only */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "../exim.h"
{
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);
return +1;
}
-if (owners != NULL)
+if (owners)
{
BOOL uid_ok = FALSE;
for (int i = 1; i <= (int)owners[0]; i++)
}
}
-if (owngroups != NULL)
+if (owngroups)
{
BOOL gid_ok = FALSE;
for (int i = 1; i <= (int)owngroups[0]; i++)