[PATCH 29/32] utils/can: Rearrange includes

Florian Bezdeka <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <20260508-wip-flo-refactor-includes-v1-29-e449f2bd4fc2@siemens.com>
Moving from "local to global" should help us to keep headers
self-contained.

Signed-off-by: Florian Bezdeka <[email protected]>
---
 utils/can/rtcanconfig.c | 14 +++++---------
 utils/can/rtcanrecv.c   |  9 ++-------
 utils/can/rtcansend.c   | 13 +++----------
 3 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/utils/can/rtcanconfig.c b/utils/can/rtcanconfig.c
index 395e0368d041a087de8dd8738719fb394e6dafb3..9565ff9f0ea823c0495a16b320ce515b01d405c2 100644
--- a/utils/can/rtcanconfig.c
+++ b/utils/can/rtcanconfig.c
@@ -22,18 +22,14 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+
+#include <boilerplate/ancillaries.h>
+#include <rtdm/can.h>
+
+#include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <signal.h>
-#include <unistd.h>
 #include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <getopt.h>
-#include <sys/mman.h>
-#include <boilerplate/ancillaries.h>
-
-#include <rtdm/can.h>
 
 static void print_usage(char *prg)
 {
diff --git a/utils/can/rtcanrecv.c b/utils/can/rtcanrecv.c
index 1b7101dab74bd9d96d28c46205ec57e03112eb96..6c3029fa0ddacb5727842d1207574ef305f21c69 100644
--- a/utils/can/rtcanrecv.c
+++ b/utils/can/rtcanrecv.c
@@ -1,16 +1,11 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <unistd.h>
-#include <time.h>
-#include <errno.h>
-#include <getopt.h>
 
 #include <alchemy/task.h>
 #include <boilerplate/ancillaries.h>
 
 #include <rtdm/can.h>
 
+#include <getopt.h>
+
 static void print_usage(char *prg)
 {
     fprintf(stderr,
diff --git a/utils/can/rtcansend.c b/utils/can/rtcansend.c
index ac8f8c1914194b0a5ce0b42e1591a9dc70681db5..b70687f6dd7ee46097e052c91798e46daee2c888 100644
--- a/utils/can/rtcansend.c
+++ b/utils/can/rtcansend.c
@@ -1,17 +1,10 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <unistd.h>
-#include <time.h>
-#include <errno.h>
-#include <getopt.h>
-
-#include <boilerplate/ancillaries.h>
 #include <alchemy/task.h>
 #include <alchemy/timer.h>
-
+#include <boilerplate/ancillaries.h>
 #include <rtdm/can.h>
 
+#include <getopt.h>
+
 extern int optind, opterr, optopt;
 
 static void print_usage(char *prg)

-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.