mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
Allow a NULL filename in log_set_filename, since it's allowed elsewhere.
Thanks Coverity! svn path=/icecast/trunk/log/; revision=10971
This commit is contained in:
parent
0320ef97f7
commit
c892e2217a
@ -198,7 +198,8 @@ int log_set_filename(int id, const char *filename)
|
|||||||
{
|
{
|
||||||
if (id < 0 || id >= LOG_MAXLOGS)
|
if (id < 0 || id >= LOG_MAXLOGS)
|
||||||
return LOG_EINSANE;
|
return LOG_EINSANE;
|
||||||
if (!strcmp(filename, "") || loglist [id] . in_use == 0)
|
/* NULL filename is ok, empty filename is not. */
|
||||||
|
if ((filename && !strcmp(filename, "")) || loglist [id] . in_use == 0)
|
||||||
return LOG_EINSANE;
|
return LOG_EINSANE;
|
||||||
_lock_logger();
|
_lock_logger();
|
||||||
if (loglist [id] . filename)
|
if (loglist [id] . filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user