mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 16:20:09 +01:00
shared/trivial: minor style fixes in "nm-utils/nm-macros-internal.h"
This commit is contained in:
parent
b278b2cd72
commit
c2dc1c6fa3
1 changed files with 6 additions and 4 deletions
|
|
@ -766,13 +766,15 @@ nm_cmp_uint32_p_with_data (gconstpointer p_a, gconstpointer p_b, gpointer user_d
|
|||
/*****************************************************************************/
|
||||
|
||||
static inline guint
|
||||
nm_encode_version (guint major, guint minor, guint micro) {
|
||||
nm_encode_version (guint major, guint minor, guint micro)
|
||||
{
|
||||
/* analog to the preprocessor macro NM_ENCODE_VERSION(). */
|
||||
return (major << 16) | (minor << 8) | micro;
|
||||
}
|
||||
|
||||
static inline void
|
||||
nm_decode_version (guint version, guint *major, guint *minor, guint *micro) {
|
||||
nm_decode_version (guint version, guint *major, guint *minor, guint *micro)
|
||||
{
|
||||
*major = (version & 0xFFFF0000u) >> 16;
|
||||
*minor = (version & 0x0000FF00u) >> 8;
|
||||
*micro = (version & 0x000000FFu);
|
||||
|
|
@ -820,7 +822,8 @@ nm_decode_version (guint version, guint *major, guint *minor, guint *micro) {
|
|||
: "(null)"); \
|
||||
})
|
||||
|
||||
#define nm_sprintf_buf(buf, format, ...) ({ \
|
||||
#define nm_sprintf_buf(buf, format, ...) \
|
||||
({ \
|
||||
char * _buf = (buf); \
|
||||
int _buf_len; \
|
||||
\
|
||||
|
|
@ -919,7 +922,6 @@ nm_decode_version (guint version, guint *major, guint *minor, guint *micro) {
|
|||
#define _G_BOOLEAN_EXPR(expr) __NM_G_BOOLEAN_EXPR_IMPL (NM_UNIQ, expr)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#endif /* __NM_MACROS_INTERNAL_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue