[Spice-commits] server/red-channel-client.cpp server/red-channel.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 23 05:31:21 UTC 2020


 server/red-channel-client.cpp |    4 ++--
 server/red-channel.h          |   11 +++--------
 2 files changed, 5 insertions(+), 10 deletions(-)

New commits:
commit d8dccabb7dae073100151763b242e53260e7b9c1
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Fri Jun 19 11:42:11 2020 +0100

    red-channel: Simplify some preprocessor macros
    
    Just pass rest of the arguments.
    Removes some extra semicolon.
    This change also remove a specific GCC extension.
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/server/red-channel-client.cpp b/server/red-channel-client.cpp
index 8e0e7fb5..9b362b56 100644
--- a/server/red-channel-client.cpp
+++ b/server/red-channel-client.cpp
@@ -229,9 +229,9 @@ static const SpiceDataHeaderOpaque mini_header_wrapper = {NULL, sizeof(SpiceMini
  * When an error occurs over a channel, we treat it as a warning
  * for spice-server and shutdown the channel.
  */
-#define spice_channel_client_error(rcc, format, ...)                                     \
+#define spice_channel_client_error(rcc, ...)                                             \
     do {                                                                                 \
-        red_channel_warning(rcc->priv->channel, format, ## __VA_ARGS__);                 \
+        red_channel_warning(rcc->priv->channel, __VA_ARGS__);                            \
         rcc->shutdown();                                                                 \
     } while (0)
 
diff --git a/server/red-channel.h b/server/red-channel.h
index 307467f9..af288a82 100644
--- a/server/red-channel.h
+++ b/server/red-channel.h
@@ -198,14 +198,9 @@ inline RedChannel::CreationFlags operator|(RedChannel::CreationFlags a, RedChann
                         id_, &*channel_, ## __VA_ARGS__);                                \
     } while (0)
 
-#define red_channel_warning(channel, format, ...)                                        \
-        red_channel_log_generic(g_warning, channel, format, ## __VA_ARGS__);
-
-#define red_channel_message(channel, format, ...)                                        \
-        red_channel_log_generic(g_message, channel, format, ## __VA_ARGS__);
-
-#define red_channel_debug(channel, format, ...)                                          \
-        red_channel_log_generic(g_debug, channel, format, ## __VA_ARGS__);
+#define red_channel_warning(...) red_channel_log_generic(g_warning, __VA_ARGS__)
+#define red_channel_message(...) red_channel_log_generic(g_message, __VA_ARGS__)
+#define red_channel_debug(...) red_channel_log_generic(g_debug, __VA_ARGS__)
 
 #include "pop-visibility.h"
 


More information about the Spice-commits mailing list