mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
os: drop unneeded DDXOSVERRORF conditional
This conditional practically only controls whether we have an pointer, where DDX can plug in it's own VErrorF() handler (currently only xwin doing that). The cost of having it even when DDX doesn't use it, is really negligible: it's just one pointer and an extra non-null check on it per VErrorF() call - a very cold path. Strangely, xwin has extra Getting rid of this unnecessary complexity that really hasn't any practical gain. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1329>
This commit is contained in:
committed by
Marge Bot
parent
40c5d39c55
commit
c3255fbc1c
6
os/log.c
6
os/log.c
@@ -104,9 +104,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#pragma clang diagnostic ignored "-Wformat-nonliteral"
|
||||
#endif
|
||||
|
||||
#ifdef DDXOSVERRORF
|
||||
void (*OsVendorVErrorFProc) (const char *, va_list args) = NULL;
|
||||
#endif
|
||||
|
||||
/* Default logging parameters. */
|
||||
#ifndef DEFAULT_LOG_VERBOSITY
|
||||
@@ -1036,14 +1034,10 @@ FatalError(const char *f, ...)
|
||||
void
|
||||
VErrorF(const char *f, va_list args)
|
||||
{
|
||||
#ifdef DDXOSVERRORF
|
||||
if (OsVendorVErrorFProc)
|
||||
OsVendorVErrorFProc(f, args);
|
||||
else
|
||||
LogVWrite(-1, f, args);
|
||||
#else
|
||||
LogVWrite(-1, f, args);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user