From c2dc1c6fa3660d2a4e2500f96ce945cd02efdcb6 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 16 Mar 2017 12:09:22 +0100 Subject: [PATCH] shared/trivial: minor style fixes in "nm-utils/nm-macros-internal.h" --- shared/nm-utils/nm-macros-internal.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h index 89e4fb591b..43b5238efc 100644 --- a/shared/nm-utils/nm-macros-internal.h +++ b/shared/nm-utils/nm-macros-internal.h @@ -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__ */