mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-01 15:06:38 +02:00
Don't stat() the logfile if user has no log::maxsize
This commit is contained in:
+1
-1
@@ -162,7 +162,7 @@ void ircd_log(int flags, FORMAT_STRING(const char *format), ...)
|
||||
#endif
|
||||
if (logs->flags & flags)
|
||||
{
|
||||
if (stat(logs->file, &fstats) != -1 && logs->maxsize && fstats.st_size >= logs->maxsize)
|
||||
if (logs->maxsize && (stat(logs->file, &fstats) != -1) && fstats.st_size >= logs->maxsize)
|
||||
{
|
||||
char oldlog[512];
|
||||
if (logs->logfd == -1)
|
||||
|
||||
Reference in New Issue
Block a user