osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27465 )
Change subject: treewide: tweak includes
......................................................................
treewide: tweak includes
Categorize includes by:
* (library includes)
* Osmocom includes except for OsmoBSCNAT
* OsmoBSCNAT includes
Order the includes in each category alphabetically, and remove empty
lines between them. This allows me to keep them consistent, and with
empty lines removed between these categories it doesn't look
inconsistent if there is only one include from two categories in one
file, but multiple includes from the same category in another file.
While at it, also have one empty line after the license header in all
c, h files, and one after the includes.
Related: SYS#5560
Change-Id: I1a7b95ccb0c87fd53645c72f0c02449e8403043b
---
M include/osmocom/bsc_nat/bsc_nat.h
M include/osmocom/bsc_nat/bsc_nat_fsm.h
M include/osmocom/bsc_nat/logging.h
M src/osmo-bsc-nat/bsc_nat.c
M src/osmo-bsc-nat/bsc_nat_fsm.c
M src/osmo-bsc-nat/logging.c
M src/osmo-bsc-nat/main.c
M src/osmo-bsc-nat/vty.c
8 files changed, 6 insertions(+), 16 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/include/osmocom/bsc_nat/bsc_nat.h b/include/osmocom/bsc_nat/bsc_nat.h
index 3c77c23..f57c42d 100644
--- a/include/osmocom/bsc_nat/bsc_nat.h
+++ b/include/osmocom/bsc_nat/bsc_nat.h
@@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/lienses/>.
*
*/
+
#pragma once
#include <osmocom/core/fsm.h>
#include <osmocom/sigtran/sccp_sap.h>
-
struct bsc_nat_sccp_inst {
uint32_t ss7_id;
struct osmo_ss7_instance *ss7_inst;
diff --git a/include/osmocom/bsc_nat/bsc_nat_fsm.h
b/include/osmocom/bsc_nat/bsc_nat_fsm.h
index 944de71..a2becfb 100644
--- a/include/osmocom/bsc_nat/bsc_nat_fsm.h
+++ b/include/osmocom/bsc_nat/bsc_nat_fsm.h
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/lienses/>.
*
*/
+
#pragma once
void bsc_nat_fsm_alloc(struct bsc_nat *bsc_nat);
diff --git a/include/osmocom/bsc_nat/logging.h b/include/osmocom/bsc_nat/logging.h
index 88f67b0..54e954c 100644
--- a/include/osmocom/bsc_nat/logging.h
+++ b/include/osmocom/bsc_nat/logging.h
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/lienses/>.
*
*/
+
#pragma once
#include <osmocom/core/logging.h>
diff --git a/src/osmo-bsc-nat/bsc_nat.c b/src/osmo-bsc-nat/bsc_nat.c
index f9867c1..b3af0d6 100644
--- a/src/osmo-bsc-nat/bsc_nat.c
+++ b/src/osmo-bsc-nat/bsc_nat.c
@@ -18,7 +18,6 @@
*/
#include "config.h"
-
#include <osmocom/core/talloc.h>
#include <osmocom/core/utils.h>
#include <osmocom/bsc_nat/bsc_nat.h>
diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c
index fb61715..2532717 100644
--- a/src/osmo-bsc-nat/bsc_nat_fsm.c
+++ b/src/osmo-bsc-nat/bsc_nat_fsm.c
@@ -18,18 +18,13 @@
*/
#include "config.h"
-
#include <errno.h>
#include <stdint.h>
-
#include <osmocom/core/fsm.h>
#include <osmocom/core/select.h>
-
#include <osmocom/gsm/gsm0808.h>
-
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_helpers.h>
-
#include <osmocom/bsc_nat/bsc_nat.h>
#include <osmocom/bsc_nat/bsc_nat_fsm.h>
#include <osmocom/bsc_nat/logging.h>
diff --git a/src/osmo-bsc-nat/logging.c b/src/osmo-bsc-nat/logging.c
index 5ada8c2..729371f 100644
--- a/src/osmo-bsc-nat/logging.c
+++ b/src/osmo-bsc-nat/logging.c
@@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/lienses/>.
*
*/
+
#include <osmocom/core/logging.h>
#include <osmocom/core/utils.h>
-
#include <osmocom/bsc_nat/logging.h>
static const struct log_info_cat log_cat[] = {
diff --git a/src/osmo-bsc-nat/main.c b/src/osmo-bsc-nat/main.c
index 7e9696e..c0b65ea 100644
--- a/src/osmo-bsc-nat/main.c
+++ b/src/osmo-bsc-nat/main.c
@@ -18,9 +18,7 @@
*/
#include "config.h"
-
#include <getopt.h>
-
#include <osmocom/core/application.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_sap.h>
@@ -29,7 +27,6 @@
#include <osmocom/vty/misc.h>
#include <osmocom/vty/ports.h>
#include <osmocom/vty/telnet_interface.h>
-
#include <osmocom/bsc_nat/bsc_nat.h>
#include <osmocom/bsc_nat/bsc_nat_fsm.h>
#include <osmocom/bsc_nat/logging.h>
diff --git a/src/osmo-bsc-nat/vty.c b/src/osmo-bsc-nat/vty.c
index 41681d4..10c669a 100644
--- a/src/osmo-bsc-nat/vty.c
+++ b/src/osmo-bsc-nat/vty.c
@@ -18,13 +18,10 @@
*/
#include "config.h"
-
#include <unistd.h>
-
-#include <osmocom/vty/telnet_interface.h>
-#include <osmocom/vty/logging.h>
#include <osmocom/vty/command.h>
-
+#include <osmocom/vty/logging.h>
+#include <osmocom/vty/telnet_interface.h>
#include <osmocom/bsc_nat/bsc_nat.h>
#include <osmocom/bsc_nat/vty.h>
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27465
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I1a7b95ccb0c87fd53645c72f0c02449e8403043b
Gerrit-Change-Number: 27465
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged