]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include/debug: fix coding style
authorKarel Zak <kzak@redhat.com>
Fri, 21 Mar 2014 10:21:56 +0000 (11:21 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Mar 2014 10:21:56 +0000 (11:21 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/debug.h

index dfb640f6b6e48d4ce26c20ddc7403f422280f0b3..069447967e0dfa4f833d7ec7dfb311521f7eeaae 100644 (file)
 
 /* l - library name, p - flag prefix, m - flag postfix, x - function */
 # define __UL_DBG(l, p, m, x) \
-                       do { \
-                               if ((p ## m) & l ## _debug_mask) { \
-                                       fprintf(stderr, "%d: %s: %8s: ", getpid(), # l, # m); \
-                                       x; \
-                               } \
-                       } while (0)
+       do { \
+               if ((p ## m) & l ## _debug_mask) { \
+                       fprintf(stderr, "%d: %s: %8s: ", getpid(), # l, # m); \
+                       x; \
+               } \
+       } while (0)
 
-#define __UL_INIT_DEBUG(lib, pref, mask, env) do { \
-       if (lib ## _debug_mask & pref ## INIT) \
-       ; \
-       else if (!mask) { \
-               char *str = getenv(# env); \
-               if (str) \
-                       lib ## _debug_mask = strtoul(str, 0, 0); \
-       } else \
-               lib ## _debug_mask = mask; \
-       lib ## _debug_mask |= pref ## INIT; \
-       if (lib ## _debug_mask != pref ## INIT) { \
-               __UL_DBG(lib, pref, INIT, ul_debug("library debug mask: 0x%04x", \
-                               lib ## _debug_mask)); \
-       } \
-} while (0)
+#define __UL_INIT_DEBUG(lib, pref, mask, env) \
+       do { \
+               if (lib ## _debug_mask & pref ## INIT) \
+               ; \
+               else if (!mask) { \
+                       char *str = getenv(# env); \
+                       if (str) \
+                               lib ## _debug_mask = strtoul(str, 0, 0); \
+               } else \
+                       lib ## _debug_mask = mask; \
+               lib ## _debug_mask |= pref ## INIT; \
+               if (lib ## _debug_mask != pref ## INIT) { \
+                       __UL_DBG(lib, pref, INIT, ul_debug("library debug mask: 0x%04x", \
+                                       lib ## _debug_mask)); \
+               } \
+       } while (0)
 
 static inline void __attribute__ ((__format__ (__printf__, 1, 2)))
 ul_debug(const char *mesg, ...)