add missing #ifndef to protect header files
authorOlivier Matz <zer0@droids-corp.org>
Tue, 1 Oct 2013 20:22:35 +0000 (22:22 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Tue, 1 Oct 2013 20:22:35 +0000 (22:22 +0200)
cmdline.h
xbee.h
xbee_proto.h
xbee_stats.h

index 3b8bf50..58798a3 100644 (file)
--- a/cmdline.h
+++ b/cmdline.h
@@ -20,6 +20,8 @@
  *
  */
 
+#ifndef _CMDLINE_H_
+#define _CMDLINE_H_
 
 #define CMDLINE_UART 1
 #define XBEE_UART 0
@@ -55,3 +57,5 @@ static inline uint8_t cmdline_getchar_wait(void)
 {
        return uart_recv(CMDLINE_UART);
 }
+
+#endif /* _CMDLINE_H_ */
diff --git a/xbee.h b/xbee.h
index 0efdb22..81097cf 100644 (file)
--- a/xbee.h
+++ b/xbee.h
@@ -25,6 +25,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _XBEE_H_
+#define _XBEE_H_
+
 /* Callback when receiving data on a specific channel. The arguments
  * of the function are the xbee device, the channel ID, the type of
  * the frame (example: XBEE_TYPE_ATRESP), the pointer to the frame,
@@ -86,3 +89,5 @@ int xbee_read(struct xbee_dev *dev);
 
 /* process all data in queue */
 int xbee_process_queue(struct xbee_dev *dev);
+
+#endif /* _XBEE_H_ */
index 778ef0b..7608379 100644 (file)
@@ -25,6 +25,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _XBEE_PROTO_H_
+#define _XBEE_PROTO_H_
+
 /* protocol headers */
 
 #define XBEE_DELIMITER 0x7E
@@ -150,3 +153,5 @@ int xbee_proto_xmit(struct xbee_dev *dev, uint8_t id, uint8_t type,
                    void *buf, unsigned len);
 
 void xbee_proto_rx(struct xbee_dev *dev);
+
+#endif /* _XBEE_PROTO_H_ */
index 3747946..539542b 100644 (file)
@@ -25,6 +25,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _XBEE_STATS_H_
+#define _XBEE_STATS_H_
+
 /* per-device statistics */
 struct xbee_stats {
        int rx_frame;
@@ -65,3 +68,5 @@ void xbee_reset_stats(struct xbee_dev *dev);
 
 /* dump statistics on stdout */
 void xbee_dump_stats(struct xbee_dev *dev);
+
+#endif /* _XBEE_STATS_H_ */