[MERGED] 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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Feb 19 08:43:52 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: Move include guard to the top
......................................................................


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(-)

Approvals:
  Stefan Sperling: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: I5114a63ce00b03c8eed23565d52969250bd505cc
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Stefan Sperling <ssperling at sysmocom.de>



More information about the gerrit-log mailing list