[MERGED] osmo-bsc[master]: cosmetic: handover.h: use "#pragma once", declare structs, c...

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Nov 29 17:37:19 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: cosmetic: handover.h: use "#pragma once", declare structs, comments
......................................................................


cosmetic: handover.h: use "#pragma once", declare structs, comments

Use new #pragma style instead of #ifndef dance.
Forward-declare all structs we're using pointers of.
Move function comments to their definitions in the .c file.

Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea
---
M include/osmocom/bsc/handover.h
M src/libbsc/handover_logic.c
2 files changed, 5 insertions(+), 8 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/handover.h b/include/osmocom/bsc/handover.h
index 3fe71a2..9e2ba1a 100644
--- a/include/osmocom/bsc/handover.h
+++ b/include/osmocom/bsc/handover.h
@@ -1,14 +1,9 @@
-#ifndef _HANDOVER_H
-#define _HANDOVER_H
+#pragma once
 
+struct gsm_lchan;
+struct gsm_bts;
 struct gsm_subscriber_connection;
 
 int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts);
-
-/* clear any operation for this connection */
 void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan);
-
-/* Return the old lchan or NULL. This is meant for audio handling */
 struct gsm_lchan *bsc_handover_pending(struct gsm_lchan *new_lchan);
-
-#endif /* _HANDOVER_H */
diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index ace8ac3..7b9dece 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -159,6 +159,7 @@
 	return 0;
 }
 
+/* clear any operation for this connection */
 void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan)
 {
 	struct bsc_handover *ho;
@@ -366,6 +367,7 @@
 	return 0;
 }
 
+/* Return the old lchan or NULL. This is meant for audio handling */
 struct gsm_lchan *bsc_handover_pending(struct gsm_lchan *new_lchan)
 {
 	struct bsc_handover *ho;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list