[Spice-devel] [PATCH spice-server] Sort include order in source files

Frediano Ziglio fziglio at redhat.com
Thu Dec 8 18:32:06 UTC 2016


Sort based on coding style.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/inputs-channel.c |  2 +-
 server/jpeg-encoder.c   |  4 +++-
 server/mjpeg-encoder.c  |  8 +++++---
 server/reds-stream.c    | 13 +++++++------
 server/spicevmc.c       |  6 +++---
 server/tree.c           |  2 +-
 server/zlib-encoder.c   |  3 ++-
 7 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/server/inputs-channel.c b/server/inputs-channel.c
index bea0ddf..3781b85 100644
--- a/server/inputs-channel.c
+++ b/server/inputs-channel.c
@@ -24,10 +24,10 @@
 #include <fcntl.h>
 #include <stddef.h> // NULL
 #include <errno.h>
+#include <stdbool.h>
 #include <spice/macros.h>
 #include <spice/vd_agent.h>
 #include <spice/protocol.h>
-#include <stdbool.h>
 
 #include <common/marshaller.h>
 #include <common/messages.h>
diff --git a/server/jpeg-encoder.c b/server/jpeg-encoder.c
index 1d090b6..5c5edf1 100644
--- a/server/jpeg-encoder.c
+++ b/server/jpeg-encoder.c
@@ -18,9 +18,11 @@
 #include <config.h>
 #endif
 
+#include <stdio.h>
+#include <jpeglib.h>
+
 #include "red-common.h"
 #include "jpeg-encoder.h"
-#include <jpeglib.h>
 
 typedef struct JpegEncoder {
     JpegEncoderUsrContext *usr;
diff --git a/server/mjpeg-encoder.c b/server/mjpeg-encoder.c
index f1f8c91..3578a5a 100644
--- a/server/mjpeg-encoder.c
+++ b/server/mjpeg-encoder.c
@@ -19,12 +19,14 @@
 #include <config.h>
 #endif
 
+#include <stdio.h>
+#include <inttypes.h>
+#include <jerror.h>
+#include <jpeglib.h>
+
 #include "red-common.h"
 #include "video-encoder.h"
 #include "utils.h"
-#include <jerror.h>
-#include <jpeglib.h>
-#include <inttypes.h>
 
 #define MJPEG_MAX_FPS 25
 #define MJPEG_MIN_FPS 1
diff --git a/server/reds-stream.c b/server/reds-stream.c
index 9896eab..2730549 100644
--- a/server/reds-stream.c
+++ b/server/reds-stream.c
@@ -19,12 +19,6 @@
 #include <config.h>
 #endif
 
-#include "main-dispatcher.h"
-#include "red-common.h"
-#include <common/log.h>
-#include "reds-stream.h"
-#include "reds.h"
-
 #include <errno.h>
 #include <netdb.h>
 #include <unistd.h>
@@ -35,6 +29,13 @@
 
 #include <openssl/err.h>
 
+#include <common/log.h>
+
+#include "main-dispatcher.h"
+#include "red-common.h"
+#include "reds-stream.h"
+#include "reds.h"
+
 struct AsyncRead {
     RedsStream *stream;
     void *opaque;
diff --git a/server/spicevmc.c b/server/spicevmc.c
index 765d287..e51feea 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -27,6 +27,9 @@
 #include <string.h>
 #include <netinet/in.h> // IPPROTO_TCP
 #include <netinet/tcp.h> // TCP_NODELAY
+#ifdef USE_LZ4
+#include <lz4.h>
+#endif
 
 #include <common/generated_server_marshallers.h>
 
@@ -35,9 +38,6 @@
 #include "red-channel-client.h"
 #include "reds.h"
 #include "migration-protocol.h"
-#ifdef USE_LZ4
-#include <lz4.h>
-#endif
 
 /* todo: add flow control. i.e.,
  * (a) limit the tokens available for the client
diff --git a/server/tree.c b/server/tree.c
index c0e125c..58f6c5c 100644
--- a/server/tree.c
+++ b/server/tree.c
@@ -19,9 +19,9 @@
 #endif
 
 #include <spice/qxl_dev.h>
+
 #include "red-parse-qxl.h"
 #include "display-channel.h"
-
 #include "tree.h"
 
 static const char *draw_type_to_str(uint8_t type)
diff --git a/server/zlib-encoder.c b/server/zlib-encoder.c
index 96a7b54..1579ed7 100644
--- a/server/zlib-encoder.c
+++ b/server/zlib-encoder.c
@@ -19,9 +19,10 @@
 #include <config.h>
 #endif
 
+#include <zlib.h>
+
 #include "red-common.h"
 #include "zlib-encoder.h"
-#include <zlib.h>
 
 struct ZlibEncoder {
     ZlibEncoderUsrContext *usr;
-- 
2.9.3



More information about the Spice-devel mailing list