mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 20:30:08 +01:00
bluetooth: ensure function-like behavior of _LOG_bzobj() macro
We want that macros behave like functions, in that they evaluate all their arguments exactly once.
This commit is contained in:
parent
95085acec3
commit
ff9f2d27ec
1 changed files with 3 additions and 2 deletions
|
|
@ -575,11 +575,12 @@ _bzobj_to_string(const BzDBusObj *bzobj, char *buf, gsize len)
|
|||
#define _LOG_bzobj(bzobj, context) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
const BzDBusObj *const _bzobj = (bzobj); \
|
||||
const BzDBusObj *const _bzobj = (bzobj); \
|
||||
const char *const _context = (context); \
|
||||
char _buf[500]; \
|
||||
\
|
||||
_LOGT("change %-21s %s : { %s }", \
|
||||
(context), \
|
||||
_context, \
|
||||
_bzobj->object_path, \
|
||||
_bzobj_to_string(_bzobj, _buf, sizeof(_buf))); \
|
||||
} \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue