[PATCH] osmo-msc[master]: add ';' after OSMO_ASSERT()

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
Thu Oct 5 13:33:18 UTC 2017


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

add ';' after OSMO_ASSERT()

Currently, OSMO_ASSERT() is defined such that it ends in a semicolon, hence an
added ';' is redundant. However, the usual way this kind of macro should be
defined is

  #define OSMO_ASSERT(x) do { ... } while(0)

so that the compiler requires a trailing semicolon.

To prepare for such a change possibly coming up in libosmocore, add ';' to all
OSMO_ASSERT() users.

Change-Id: Ic79c8b8f98a7f3bef761751d55a7e6125cf2c46d
---
M src/libmsc/gsm_04_08.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/43/4143/1

diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 84f52c6..8a5265b 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -3220,7 +3220,7 @@
 	uint8_t pdisc;
 	int rc = 0;
 
-	OSMO_ASSERT(msg->l3h)
+	OSMO_ASSERT(msg->l3h);
 	OSMO_ASSERT(conn);
 	OSMO_ASSERT(msg);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic79c8b8f98a7f3bef761751d55a7e6125cf2c46d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list