[Replicant] [libsamsung-ipc] [PATCH] tools: reorder includes

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Thu Jul 16 14:47:58 UTC 2020


This reorders includes alphabetically and groups them together:
- C standard library includes of depth 1 are grouped together
- "System" libraries of depth > 1 age grouped together
- The (lib)samsung-ipc include(s) is/are grouped together

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 tools/ipc-modem.c   | 15 ++++++++-------
 tools/ipc-test.c    |  2 +-
 tools/nv_data-md5.c |  5 +++--
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/tools/ipc-modem.c b/tools/ipc-modem.c
index 6b4e0fa..9314de6 100644
--- a/tools/ipc-modem.c
+++ b/tools/ipc-modem.c
@@ -18,19 +18,20 @@
  * along with libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <stdint.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <pthread.h>
 #include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <termios.h>
-#include <fcntl.h>
+#include <unistd.h>
 #include <string.h>
+
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <pthread.h>
-#include <getopt.h>
 
 #include <samsung-ipc.h>
 
diff --git a/tools/ipc-test.c b/tools/ipc-test.c
index 17e8f9b..2bb9f36 100644
--- a/tools/ipc-test.c
+++ b/tools/ipc-test.c
@@ -17,8 +17,8 @@
  * along with libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <samsung-ipc.h>
diff --git a/tools/nv_data-md5.c b/tools/nv_data-md5.c
index 224d657..e8c9fc8 100644
--- a/tools/nv_data-md5.c
+++ b/tools/nv_data-md5.c
@@ -17,12 +17,13 @@
  * along with libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include <sys/types.h>
 
 #include <samsung-ipc.h>
-#include <string.h>
 
 void usage_print(void)
 {
-- 
2.27.0



More information about the Replicant mailing list