[PATCH] osmo-pcu[master]: Move include guard to the top

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Tue Jan 30 12:55:53 UTC 2018


Review at  https://gerrit.osmocom.org/6195

Move include guard to the top

Having explicit include above the douible-include guard defines is
potential source for hard to track bugs. Let's move it inside the guard
statement.

Change-Id: I5114a63ce00b03c8eed23565d52969250bd505cc
Related: OS#1539
---
M src/csn1.h
M src/gsm_rlcmac.h
2 files changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/95/6195/1

diff --git a/src/csn1.h b/src/csn1.h
index 3f5b849..1015e69 100644
--- a/src/csn1.h
+++ b/src/csn1.h
@@ -25,15 +25,15 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+#ifndef _PACKET_CSN1_H_
+#define _PACKET_CSN1_H_
+
 extern "C" {
 #include <osmocom/core/bitvec.h>
 }
 
 #include <iostream>
 #include <cstdlib>
-#ifndef _PACKET_CSN1_H_
-#define _PACKET_CSN1_H_
-
 
 #define MIN(a,b) (((a)<(b))?(a):(b))
 //#define max(a,b) (((a)>(b))?(a):(b))
diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h
index 8f4039c..2ad1937 100644
--- a/src/gsm_rlcmac.h
+++ b/src/gsm_rlcmac.h
@@ -29,11 +29,12 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+#ifndef __PACKET_GSM_RLCMAC_H__
+#define __PACKET_GSM_RLCMAC_H__
+
 #include "csn1.h"
 #include <iostream>
 #include <cstdlib>
-#ifndef __PACKET_GSM_RLCMAC_H__
-#define __PACKET_GSM_RLCMAC_H__
 
 #ifndef PRE_PACKED
 #define PRE_PACKED

-- 
To view, visit https://gerrit.osmocom.org/6195
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5114a63ce00b03c8eed23565d52969250bd505cc
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list