dbus-internals: use _DBUS_FUNCTION_NAME in _dbus_verbose()

dbus-internals.h already defines a macro which expands to the name
of the current function based on C standard version, etc. So use
that instead of hard-coding `__FUNCTION__`.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
This commit is contained in:
Barnabás Pőcze 2023-05-04 16:26:31 +02:00 committed by Simon McVittie
parent 45e6e93e30
commit 0bb1942ef6

View file

@ -104,7 +104,7 @@ void _dbus_warn_return_if_fail (const char *function,
DBUS_PRIVATE_EXPORT
void _dbus_verbose_real (const char *file, const int line, const char *function,
const char *format,...) _DBUS_GNUC_PRINTF (4, 5);
# define _dbus_verbose(fmt,...) _dbus_verbose_real( __FILE__,__LINE__,__FUNCTION__,fmt, ## __VA_ARGS__)
# define _dbus_verbose(fmt,...) _dbus_verbose_real( __FILE__,__LINE__,_DBUS_FUNCTION_NAME,fmt, ## __VA_ARGS__)
#else
DBUS_PRIVATE_EXPORT
void _dbus_verbose_real (const char *format,