(!1683) os: replace LogVWrite() by LogVMessageVerb()

It's just a wrapper around LogVMessageVerb() and no external module
using it, so can easily be optimized-away.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-09 16:14:33 +02:00
parent 9669879a45
commit 939f357e78
4 changed files with 4 additions and 13 deletions

View File

@ -1125,7 +1125,7 @@ xf86ErrorFVerb(int verb, const char *format, ...)
va_start(ap, format);
if (xf86Verbose >= verb || xf86LogVerbose >= verb)
LogVWrite(verb, format, ap);
LogVMessageVerb(X_NONE, verb, format, ap);
va_end(ap);
}
@ -1137,7 +1137,7 @@ xf86ErrorF(const char *format, ...)
va_start(ap, format);
if (xf86Verbose >= 1 || xf86LogVerbose >= 1)
LogVWrite(1, format, ap);
LogVMessageVerb(X_NONE, 1, format, ap);
va_end(ap);
}

View File

@ -51,7 +51,7 @@ OsVendorVErrorF(const char *pszFormat, va_list va_args)
pthread_mutex_lock(&s_pmPrinting);
/* Print the error message to a log file, could be stderr */
LogVWrite(0, pszFormat, va_args);
LogVMessageVerb(X_NONE, 0, pszFormat, va_args);
/* Unlock the printing mutex */
pthread_mutex_unlock(&s_pmPrinting);

View File

@ -340,9 +340,6 @@ typedef enum {
X_UNKNOWN = -1 /* unknown -- this must always be last */
} MessageType;
extern _X_EXPORT void
LogVWrite(int verb, const char *f, va_list args)
_X_ATTRIBUTE_PRINTF(2, 0);
extern _X_EXPORT void
LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
_X_ATTRIBUTE_PRINTF(3, 0);

View File

@ -669,12 +669,6 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line)
(void) ret;
}
void
LogVWrite(int verb, const char *f, va_list args)
{
return LogVMessageVerb(X_NONE, verb, f, args);
}
/* Returns the Message Type string to prepend to a logging message, or NULL
* if the message will be dropped due to insufficient verbosity. */
static const char *
@ -1043,7 +1037,7 @@ VErrorF(const char *f, va_list args)
if (OsVendorVErrorFProc)
OsVendorVErrorFProc(f, args);
else
LogVWrite(-1, f, args);
LogVMessageVerb(X_NONE, -1, f, args);
}
void