[glib: 1/3] gmessages: Reformat g_return_*if_fail() macros to fix whitespace



commit 96c653265f8673d79c84056df5892cda332511dc
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Oct 3 14:45:12 2018 +0100

    gmessages: Reformat g_return_*if_fail() macros to fix whitespace
    
    I’m fed up of trying to read these and having my head done in by mixed
    tabs and spaces.
    
    This introduces no functional changes.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/gmessages.h | 82 ++++++++++++++++++++++++++++++++------------------------
 1 file changed, 47 insertions(+), 35 deletions(-)
---
diff --git a/glib/gmessages.h b/glib/gmessages.h
index cebdc1659..c609d087f 100644
--- a/glib/gmessages.h
+++ b/glib/gmessages.h
@@ -581,41 +581,53 @@ GPrintFunc      g_set_printerr_handler  (GPrintFunc      func);
 
 #else /* !G_DISABLE_CHECKS */
 
-#define g_return_if_fail(expr)         G_STMT_START{                   \
-     if G_LIKELY(expr) { } else                                        \
-       {                                                               \
-        g_return_if_fail_warning (G_LOG_DOMAIN,                        \
-                                  G_STRFUNC,                           \
-                                  #expr);                              \
-        return;                                                        \
-       };                              }G_STMT_END
-
-#define g_return_val_if_fail(expr,val) G_STMT_START{                   \
-     if G_LIKELY(expr) { } else                                                \
-       {                                                               \
-        g_return_if_fail_warning (G_LOG_DOMAIN,                        \
-                                  G_STRFUNC,                           \
-                                  #expr);                              \
-        return (val);                                                  \
-       };                              }G_STMT_END
-
-#define g_return_if_reached()          G_STMT_START{                   \
-     g_log (G_LOG_DOMAIN,                                              \
-           G_LOG_LEVEL_CRITICAL,                                       \
-           "file %s: line %d (%s): should not be reached",             \
-           __FILE__,                                                   \
-           __LINE__,                                                   \
-           G_STRFUNC);                                                 \
-     return;                           }G_STMT_END
-
-#define g_return_val_if_reached(val)   G_STMT_START{                   \
-     g_log (G_LOG_DOMAIN,                                              \
-           G_LOG_LEVEL_CRITICAL,                                       \
-           "file %s: line %d (%s): should not be reached",             \
-           __FILE__,                                                   \
-           __LINE__,                                                   \
-           G_STRFUNC);                                                 \
-     return (val);                     }G_STMT_END
+#define g_return_if_fail(expr) \
+  G_STMT_START { \
+    if (G_LIKELY (expr)) \
+      { } \
+    else \
+      { \
+        g_return_if_fail_warning (G_LOG_DOMAIN, \
+                                  G_STRFUNC, \
+                                  #expr); \
+        return; \
+      } \
+  } G_STMT_END
+
+#define g_return_val_if_fail(expr, val) \
+  G_STMT_START { \
+    if (G_LIKELY (expr)) \
+      { } \
+    else \
+      { \
+        g_return_if_fail_warning (G_LOG_DOMAIN, \
+                                  G_STRFUNC, \
+                                  #expr); \
+        return (val); \
+      } \
+  } G_STMT_END
+
+#define g_return_if_reached() \
+  G_STMT_START { \
+    g_log (G_LOG_DOMAIN, \
+           G_LOG_LEVEL_CRITICAL, \
+           "file %s: line %d (%s): should not be reached", \
+           __FILE__, \
+           __LINE__, \
+           G_STRFUNC); \
+    return; \
+  } G_STMT_END
+
+#define g_return_val_if_reached(val) \
+  G_STMT_START { \
+    g_log (G_LOG_DOMAIN, \
+           G_LOG_LEVEL_CRITICAL, \
+           "file %s: line %d (%s): should not be reached", \
+           __FILE__, \
+           __LINE__, \
+           G_STRFUNC); \
+    return (val); \
+  } G_STMT_END
 
 #endif /* !G_DISABLE_CHECKS */
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]