logging: handle too many file logs
Don't rely on an assert to catch insufficient maximum number of file logs (e.g. after introducing a new file log).
This commit is contained in:
parent
b0fe443632
commit
c9f03fb222
1 changed files with 4 additions and 1 deletions
|
@ -243,7 +243,10 @@ LOG_CloseParentFd()
|
|||
LOG_FileID
|
||||
LOG_FileOpen(const char *name, const char *banner)
|
||||
{
|
||||
assert(n_filelogs < MAX_FILELOGS);
|
||||
if (n_filelogs >= MAX_FILELOGS) {
|
||||
assert(0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
logfiles[n_filelogs].name = name;
|
||||
logfiles[n_filelogs].banner = banner;
|
||||
|
|
Loading…
Reference in a new issue