summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-07-23 23:41:51 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-07-25 11:17:40 +0200
commit90019676b076abdfc076ed6f38005d6cce89923b (patch)
tree63fcbfc3018ae9953b1ef8049c51a07cd1a8728e /drivers/unix
parent3084a48ace3e7dabd83e4c62280328f429defad6 (diff)
Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/dir_access_unix.cpp2
-rw-r--r--drivers/unix/dir_access_unix.h5
-rw-r--r--drivers/unix/file_access_unix.cpp2
-rw-r--r--drivers/unix/file_access_unix.h5
-rw-r--r--drivers/unix/ip_unix.h1
-rw-r--r--drivers/unix/net_socket_posix.h6
-rw-r--r--drivers/unix/os_unix.h4
-rw-r--r--drivers/unix/syslog_logger.h4
-rw-r--r--drivers/unix/thread_posix.h2
9 files changed, 17 insertions, 14 deletions
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index 39dbadf3cd..b8b72b8d30 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -516,4 +516,4 @@ DirAccessUnix::~DirAccessUnix() {
list_dir_end();
}
-#endif //posix_enabled
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED
diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h
index 5e2129b74a..18f435f942 100644
--- a/drivers/unix/dir_access_unix.h
+++ b/drivers/unix/dir_access_unix.h
@@ -90,5 +90,6 @@ public:
~DirAccessUnix();
};
-#endif //UNIX ENABLED
-#endif
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED
+
+#endif // DIR_ACCESS_UNIX_H
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 99836b7bea..388ad479b9 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -339,4 +339,4 @@ FileAccessUnix::~FileAccessUnix() {
_close();
}
-#endif
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED
diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h
index 0261b8be53..d61fc08f57 100644
--- a/drivers/unix/file_access_unix.h
+++ b/drivers/unix/file_access_unix.h
@@ -86,5 +86,6 @@ public:
virtual ~FileAccessUnix();
};
-#endif
-#endif
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED
+
+#endif // FILE_ACCESS_UNIX_H
diff --git a/drivers/unix/ip_unix.h b/drivers/unix/ip_unix.h
index 06fcdb6e17..798d02095c 100644
--- a/drivers/unix/ip_unix.h
+++ b/drivers/unix/ip_unix.h
@@ -50,4 +50,5 @@ public:
};
#endif
+
#endif // IP_UNIX_H
diff --git a/drivers/unix/net_socket_posix.h b/drivers/unix/net_socket_posix.h
index 867513099a..5558114cb1 100644
--- a/drivers/unix/net_socket_posix.h
+++ b/drivers/unix/net_socket_posix.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef NET_SOCKET_UNIX_H
-#define NET_SOCKET_UNIX_H
+#ifndef NET_SOCKET_POSIX_H
+#define NET_SOCKET_POSIX_H
#include "core/io/net_socket.h"
@@ -104,4 +104,4 @@ public:
~NetSocketPosix();
};
-#endif
+#endif // NET_SOCKET_POSIX_H
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index a1ed4bd501..f4609a565b 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -98,6 +98,6 @@ public:
virtual ~UnixTerminalLogger();
};
-#endif
+#endif // UNIX_ENABLED
-#endif
+#endif // OS_UNIX_H
diff --git a/drivers/unix/syslog_logger.h b/drivers/unix/syslog_logger.h
index 697a96a6f9..cc6617eb25 100644
--- a/drivers/unix/syslog_logger.h
+++ b/drivers/unix/syslog_logger.h
@@ -43,6 +43,6 @@ public:
virtual ~SyslogLogger();
};
-#endif
+#endif // UNIX_ENABLED
-#endif
+#endif // SYSLOG_LOGGER_H
diff --git a/drivers/unix/thread_posix.h b/drivers/unix/thread_posix.h
index 9cd3ecbe90..672adcba72 100644
--- a/drivers/unix/thread_posix.h
+++ b/drivers/unix/thread_posix.h
@@ -35,4 +35,4 @@
void init_thread_posix();
#endif
-#endif
+#endif // THREAD_POSIX_H