From 5fe337bc6c64f4693a9a3e348f223760c63dc6d6 Mon Sep 17 00:00:00 2001
From: Laurent Navet <laurent.navet@gmail.com>
Date: Wed, 26 Oct 2016 21:53:58 +0200
Subject: [PATCH] sys: fix include headers guards

---
 sys/include/color.h                                |  6 +++---
 sys/include/od.h                                   |  6 +++---
 sys/include/pipe.h                                 |  6 +++---
 sys/include/ps.h                                   |  6 +++---
 sys/include/shell.h                                |  6 +++---
 sys/include/shell_commands.h                       |  6 +++---
 sys/include/timex.h                                |  6 +++---
 sys/include/tm.h                                   |  6 +++---
 sys/log/log_printfnoformat/log_module.h            |  6 +++---
 sys/oneway-malloc/include/malloc.h                 |  6 +++---
 sys/posix/pthread/include/pthread.h                |  6 +++---
 sys/posix/pthread/include/pthread_barrier.h        |  6 +++---
 sys/posix/pthread/include/pthread_cancellation.h   |  6 +++---
 sys/posix/pthread/include/pthread_cleanup.h        |  6 +++---
 sys/posix/pthread/include/pthread_cond.h           | 11 +++++++----
 sys/posix/pthread/include/pthread_mutex.h          |  6 +++---
 sys/posix/pthread/include/pthread_mutex_attr.h     |  6 +++---
 sys/posix/pthread/include/pthread_once.h           |  6 +++---
 sys/posix/pthread/include/pthread_rwlock.h         |  6 +++---
 sys/posix/pthread/include/pthread_rwlock_attr.h    |  6 +++---
 sys/posix/pthread/include/pthread_scheduling.h     |  6 +++---
 sys/posix/pthread/include/pthread_threading.h      |  6 +++---
 sys/posix/pthread/include/pthread_threading_attr.h |  6 +++---
 sys/posix/pthread/include/pthread_tls.h            | 11 +++++++----
 24 files changed, 80 insertions(+), 74 deletions(-)

diff --git a/sys/include/color.h b/sys/include/color.h
index 0ad5c0e7ad..7ef303a56b 100644
--- a/sys/include/color.h
+++ b/sys/include/color.h
@@ -20,8 +20,8 @@
  * @author      Simon Brummer <brummer.simon@googlemail.com>
  */
 
-#ifndef __COLOR_H
-#define __COLOR_H
+#ifndef COLOR_H
+#define COLOR_H
 
 #include <stdint.h>
 
@@ -137,5 +137,5 @@ void color_rgb_complementary(const color_rgb_t *rgb, color_rgb_t *comp_rgb);
 }
 #endif
 
-#endif /* __COLOR_H */
+#endif /* COLOR_H */
 /** @} */
diff --git a/sys/include/od.h b/sys/include/od.h
index d7120659c0..e15bb51a6e 100644
--- a/sys/include/od.h
+++ b/sys/include/od.h
@@ -24,8 +24,8 @@
  *
  * @author  Martine Lenders <mlenders@inf.fu-berlin.de>
  */
-#ifndef __OD_H_
-#define __OD_H_
+#ifndef OD_H
+#define OD_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -157,5 +157,5 @@ static inline void od_hex_dump(const void *data, size_t data_len, uint8_t width)
 }
 #endif
 
-#endif /* __OD_H_ */
+#endif /* OD_H */
 /** @} */
diff --git a/sys/include/pipe.h b/sys/include/pipe.h
index 18b47634c3..6e91b26943 100644
--- a/sys/include/pipe.h
+++ b/sys/include/pipe.h
@@ -32,8 +32,8 @@
  * @author      René Kijewski <rene.kijewski@fu-berlin.de>
  */
 
-#ifndef __PIPE__H
-#define __PIPE__H
+#ifndef PIPE__H
+#define PIPE__H
 
 #include <sys/types.h>
 
@@ -121,7 +121,7 @@ void pipe_free(pipe_t *rp);
 }
 #endif
 
-#endif
+#endif /* PIPE__H */
 /**
  * @}
  */
diff --git a/sys/include/ps.h b/sys/include/ps.h
index eff0916dc9..fe971a578c 100644
--- a/sys/include/ps.h
+++ b/sys/include/ps.h
@@ -20,8 +20,8 @@
  * @author      Oliver Hahm <oliver.hahm@inria.fr>
  */
 
-#ifndef __PS_H
-#define __PS_H
+#ifndef PS_H
+#define PS_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -36,5 +36,5 @@ void ps(void);
 }
 #endif
 
-#endif /* __PS_H */
+#endif /* PS_H */
 /** @} */
diff --git a/sys/include/shell.h b/sys/include/shell.h
index 5b953ac6a7..c2df96e57f 100644
--- a/sys/include/shell.h
+++ b/sys/include/shell.h
@@ -17,8 +17,8 @@
  * @brief       Shell interface definition
  */
 
-#ifndef __SHELL_H
-#define __SHELL_H
+#ifndef SHELL_H
+#define SHELL_H
 
 #include <stdint.h>
 
@@ -78,5 +78,5 @@ void shell_run(const shell_command_t *commands, char *line_buf, int len) NORETUR
 }
 #endif
 
-#endif /* __SHELL_H */
+#endif /* SHELL_H */
 /** @} */
diff --git a/sys/include/shell_commands.h b/sys/include/shell_commands.h
index e2afd2e0b5..9e4eebba0a 100644
--- a/sys/include/shell_commands.h
+++ b/sys/include/shell_commands.h
@@ -17,8 +17,8 @@
  * @author      Kaspar Schleiser <kaspar@schleiser.de>
  */
 
-#ifndef __SHELL_COMMANDS_H
-#define __SHELL_COMMANDS_H
+#ifndef SHELL_COMMANDS_H
+#define SHELL_COMMANDS_H
 
 #include "shell.h"
 
@@ -38,5 +38,5 @@ extern const shell_command_t _shell_command_list[];
 }
 #endif
 
-#endif /* __SHELL_COMMANDS_H */
+#endif /* SHELL_COMMANDS_H */
 /** @} */
diff --git a/sys/include/timex.h b/sys/include/timex.h
index 9a94321433..8ef77931b7 100644
--- a/sys/include/timex.h
+++ b/sys/include/timex.h
@@ -18,8 +18,8 @@
  * @brief       Utility library for comparing and computing timestamps
  */
 
-#ifndef __TIMEX_H
-#define __TIMEX_H
+#ifndef TIMEX_H
+#define TIMEX_H
 
 #include <stdint.h>
 #include <inttypes.h>
@@ -184,4 +184,4 @@ const char *timex_to_str(timex_t t, char *timestamp);
 #endif
 
 /** @} */
-#endif /* __TIMEX_H */
+#endif /* TIMEX_H */
diff --git a/sys/include/tm.h b/sys/include/tm.h
index e8e9cc6db0..005eb0d509 100644
--- a/sys/include/tm.h
+++ b/sys/include/tm.h
@@ -14,8 +14,8 @@
  * @brief       Utility library for `struct tm`.
  */
 
-#ifndef __SYS__TIMEX__TM__H
-#define __SYS__TIMEX__TM__H
+#ifndef SYS__TIMEX__TM__H
+#define SYS__TIMEX__TM__H
 
 #include <time.h>
 #include <sys/time.h>
@@ -119,5 +119,5 @@ int tm_is_valid_time(int hour, int min, int sec) CONST;
 }
 #endif
 
-#endif
+#endif /* SYS__TIMEX__TM__H */
 /** @} */
diff --git a/sys/log/log_printfnoformat/log_module.h b/sys/log/log_printfnoformat/log_module.h
index 64c7d451ac..be286829dd 100644
--- a/sys/log/log_printfnoformat/log_module.h
+++ b/sys/log/log_printfnoformat/log_module.h
@@ -20,8 +20,8 @@
  * @author      Kaspar Schleiser <kaspar@schleiser.de>
  */
 
-#ifndef __LOG_FORMAT_H
-#define __LOG_FORMAT_H
+#ifndef LOG_FORMAT_H
+#define LOG_FORMAT_H
 
 #include <stdio.h>
 
@@ -47,4 +47,4 @@ static inline void log_write(unsigned level, const char *format, ...) {
 }
 #endif
 /**@}*/
-#endif /* __LOG_FORMAT_H */
+#endif /* LOG_FORMAT_H */
diff --git a/sys/oneway-malloc/include/malloc.h b/sys/oneway-malloc/include/malloc.h
index 4d61cc929d..a0844d08e9 100644
--- a/sys/oneway-malloc/include/malloc.h
+++ b/sys/oneway-malloc/include/malloc.h
@@ -27,8 +27,8 @@
  * @author      René Kijewski <rene.kijewski@fu-berlin.de>
  */
 
-#ifndef __MALLOC_H
-#define __MALLOC_H
+#ifndef MALLOC_H
+#define MALLOC_H
 
 #include <stdlib.h>
 
@@ -77,7 +77,7 @@ void free(void *ptr);
 }
 #endif
 
-#endif /* __MALLOC_H */
+#endif /* MALLOC_H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread.h b/sys/posix/pthread/include/pthread.h
index 0795343278..183e9ecb69 100644
--- a/sys/posix/pthread/include/pthread.h
+++ b/sys/posix/pthread/include/pthread.h
@@ -17,8 +17,8 @@
  * @see     [The Open Group Base Specifications Issue 7: pthread.h - threads](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html)
  */
 
-#ifndef __SYS__POSIX__PTHREAD__H
-#define __SYS__POSIX__PTHREAD__H
+#ifndef SYS__POSIX__PTHREAD__H
+#define SYS__POSIX__PTHREAD__H
 
 #include <time.h>
 
@@ -48,7 +48,7 @@ extern "C" {
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_barrier.h b/sys/posix/pthread/include/pthread_barrier.h
index 8218af386f..59b3554d48 100644
--- a/sys/posix/pthread/include/pthread_barrier.h
+++ b/sys/posix/pthread/include/pthread_barrier.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_BARRIER__H
-#define __SYS__POSIX__PTHREAD_BARRIER__H
+#ifndef SYS__POSIX__PTHREAD_BARRIER__H
+#define SYS__POSIX__PTHREAD_BARRIER__H
 
 #include "mutex.h"
 
@@ -136,7 +136,7 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_BARRIER__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_cancellation.h b/sys/posix/pthread/include/pthread_cancellation.h
index 9163370228..896509820c 100644
--- a/sys/posix/pthread/include/pthread_cancellation.h
+++ b/sys/posix/pthread/include/pthread_cancellation.h
@@ -15,8 +15,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_CANCELLCATION__H
-#define __SYS__POSIX__PTHREAD_CANCELLCATION__H
+#ifndef SYS__POSIX__PTHREAD_CANCELLCATION__H
+#define SYS__POSIX__PTHREAD_CANCELLCATION__H
 
 #ifdef __cplusplus
 extern "C" {
@@ -69,7 +69,7 @@ void pthread_testcancel(void);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_CANCELLCATION__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_cleanup.h b/sys/posix/pthread/include/pthread_cleanup.h
index b92114ba71..4c17334dab 100644
--- a/sys/posix/pthread/include/pthread_cleanup.h
+++ b/sys/posix/pthread/include/pthread_cleanup.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_CLEANUP__H
-#define __SYS__POSIX__PTHREAD_CLEANUP__H
+#ifndef SYS__POSIX__PTHREAD_CLEANUP__H
+#define SYS__POSIX__PTHREAD_CLEANUP__H
 
 #ifdef __cplusplus
 extern "C" {
@@ -95,7 +95,7 @@ void __pthread_cleanup_pop(__pthread_cleanup_datum_t *datum, int execute);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_CLEANUP__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_cond.h b/sys/posix/pthread/include/pthread_cond.h
index 518780e07b..ebbd54f731 100644
--- a/sys/posix/pthread/include/pthread_cond.h
+++ b/sys/posix/pthread/include/pthread_cond.h
@@ -14,8 +14,8 @@
  * @author      Martin Landsmann <martin.landsmann@haw-hamburg.de>
  */
 
-#ifndef __SYS__POSIX__PTHREAD_COND__H
-#define __SYS__POSIX__PTHREAD_COND__H
+#ifndef SYS__POSIX__PTHREAD_COND__H
+#define SYS__POSIX__PTHREAD_COND__H
 
 #include <time.h>
 #include "mutex.h"
@@ -150,5 +150,8 @@ int pthread_cond_broadcast(pthread_cond_t *cond);
 }
 #endif
 
-/** @} */
-#endif /* _CONDITION_VARIABLE_H */
+#endif /* SYS__POSIX__PTHREAD_COND__H */
+
+/**
+ * @}
+ */
diff --git a/sys/posix/pthread/include/pthread_mutex.h b/sys/posix/pthread/include/pthread_mutex.h
index 4c0d602dc5..6b4bc20d71 100644
--- a/sys/posix/pthread/include/pthread_mutex.h
+++ b/sys/posix/pthread/include/pthread_mutex.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_MUTEX__H
-#define __SYS__POSIX__PTHREAD_MUTEX__H
+#ifndef SYS__POSIX__PTHREAD_MUTEX__H
+#define SYS__POSIX__PTHREAD_MUTEX__H
 
 #include <time.h>
 
@@ -112,7 +112,7 @@ int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int prioceiling, int *o
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_MUTEX__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_mutex_attr.h b/sys/posix/pthread/include/pthread_mutex_attr.h
index 041200a2e8..e3e7be1c8d 100644
--- a/sys/posix/pthread/include/pthread_mutex_attr.h
+++ b/sys/posix/pthread/include/pthread_mutex_attr.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_MUTEX_ATTR__H
-#define __SYS__POSIX__PTHREAD_MUTEX_ATTR__H
+#ifndef SYS__POSIX__PTHREAD_MUTEX_ATTR__H
+#define SYS__POSIX__PTHREAD_MUTEX_ATTR__H
 
 #include <errno.h>
 
@@ -215,7 +215,7 @@ int pthread_mutexattr_setrobust(pthread_mutexattr_t *attr, int robustness);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_MUTEX_ATTR__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_once.h b/sys/posix/pthread/include/pthread_once.h
index afc4754d18..c59586d6ec 100644
--- a/sys/posix/pthread/include/pthread_once.h
+++ b/sys/posix/pthread/include/pthread_once.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_ONCE__H
-#define __SYS__POSIX__PTHREAD_ONCE__H
+#ifndef SYS__POSIX__PTHREAD_ONCE__H
+#define SYS__POSIX__PTHREAD_ONCE__H
 
 #ifdef __cplusplus
 extern "C" {
@@ -48,7 +48,7 @@ int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_ONCE__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_rwlock.h b/sys/posix/pthread/include/pthread_rwlock.h
index 4683d01142..7c0c945a1d 100644
--- a/sys/posix/pthread/include/pthread_rwlock.h
+++ b/sys/posix/pthread/include/pthread_rwlock.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_RWLOCK__H
-#define __SYS__POSIX__PTHREAD_RWLOCK__H
+#ifndef SYS__POSIX__PTHREAD_RWLOCK__H
+#define SYS__POSIX__PTHREAD_RWLOCK__H
 
 #include "priority_queue.h"
 #include "thread.h"
@@ -176,7 +176,7 @@ bool __pthread_rwlock_blocked_writingly(const pthread_rwlock_t *rwlock);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_ONCE__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_rwlock_attr.h b/sys/posix/pthread/include/pthread_rwlock_attr.h
index d906c339d3..fc987a8e58 100644
--- a/sys/posix/pthread/include/pthread_rwlock_attr.h
+++ b/sys/posix/pthread/include/pthread_rwlock_attr.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_RWLOCK_ATTR__H
-#define __SYS__POSIX__PTHREAD_RWLOCK_ATTR__H
+#ifndef SYS__POSIX__PTHREAD_RWLOCK_ATTR__H
+#define SYS__POSIX__PTHREAD_RWLOCK_ATTR__H
 
 #include <errno.h>
 
@@ -80,7 +80,7 @@ int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_RWLOCK_ATTR__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_scheduling.h b/sys/posix/pthread/include/pthread_scheduling.h
index 0e270720f8..cd92ee4900 100644
--- a/sys/posix/pthread/include/pthread_scheduling.h
+++ b/sys/posix/pthread/include/pthread_scheduling.h
@@ -15,8 +15,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_SCHEDULING__H
-#define __SYS__POSIX__PTHREAD_SCHEDULING__H
+#ifndef SYS__POSIX__PTHREAD_SCHEDULING__H
+#define SYS__POSIX__PTHREAD_SCHEDULING__H
 
 #ifdef __cplusplus
 extern "C" {
@@ -55,7 +55,7 @@ int pthread_setschedprio(pthread_t target_thread, int prio);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_SCHEDULING__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_threading.h b/sys/posix/pthread/include/pthread_threading.h
index 101fe0d80c..456e2ec769 100644
--- a/sys/posix/pthread/include/pthread_threading.h
+++ b/sys/posix/pthread/include/pthread_threading.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_THREADING__H
-#define __SYS__POSIX__PTHREAD_THREADING__H
+#ifndef SYS__POSIX__PTHREAD_THREADING__H
+#define SYS__POSIX__PTHREAD_THREADING__H
 
 #include "kernel_defines.h"
 
@@ -107,7 +107,7 @@ static inline int pthread_equal(pthread_t thread1, pthread_t thread2)
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_THREADING__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_threading_attr.h b/sys/posix/pthread/include/pthread_threading_attr.h
index 05c5d399f5..302c5e5685 100644
--- a/sys/posix/pthread/include/pthread_threading_attr.h
+++ b/sys/posix/pthread/include/pthread_threading_attr.h
@@ -14,8 +14,8 @@
  * @note    Do not include this header file directly, but pthread.h.
  */
 
-#ifndef __SYS__POSIX__PTHREAD_THREADING_ATTR__H
-#define __SYS__POSIX__PTHREAD_THREADING_ATTR__H
+#ifndef SYS__POSIX__PTHREAD_THREADING_ATTR__H
+#define SYS__POSIX__PTHREAD_THREADING_ATTR__H
 
 #ifdef __cplusplus
 extern "C" {
@@ -206,7 +206,7 @@ int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
 }
 #endif
 
-#endif
+#endif /* SYS__POSIX__PTHREAD_THREADING_ATTR__H */
 
 /**
  * @}
diff --git a/sys/posix/pthread/include/pthread_tls.h b/sys/posix/pthread/include/pthread_tls.h
index 23a221f625..93b119767c 100644
--- a/sys/posix/pthread/include/pthread_tls.h
+++ b/sys/posix/pthread/include/pthread_tls.h
@@ -15,8 +15,8 @@
  * @author      René Kijewski <rene.kijewski@fu-berlin.de>
  */
 
-#ifndef __SYS__POSIX__PTHREAD_TLS__H
-#define __SYS__POSIX__PTHREAD_TLS__H
+#ifndef SYS__POSIX__PTHREAD_TLS__H
+#define SYS__POSIX__PTHREAD_TLS__H
 
 #ifdef __cplusplus
 extern "C" {
@@ -87,5 +87,8 @@ struct __pthread_tls_datum **__pthread_get_tls_head(int self_id) PURE;
 }
 #endif
 
-#endif /* __SYS__POSIX__PTHREAD_TLS__H */
-/** @} */
+#endif /* SYS__POSIX__PTHREAD_TLS__H */
+
+/**
+ * @}
+ */
-- 
GitLab