From 19742408cf3d83bb67e4b8c2fc3b0cbbee7bee59 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 21 Dec 2018 10:18:28 +0100 Subject: GSUP: add end marker to enum osmo_gsup_iei Simplify gsup_test.c by defining an end marker in gsup.h. No need to manually update the last element every time anymore. The C standard guarantees, that the end marker will have the last value plus one: "Each subsequent enumerator with no = defines its enumeration constant as the value of the constant expression obtained by adding 1 to the value of the previous enumeration constant." (From C99: 6.7.2.2 Enumeration specifiers) Change-Id: I2aab7245e209f0ebd2f33a83d4d181dd3339cb17 --- include/osmocom/gsm/gsup.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 51871e44..37e474c2 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -98,6 +98,8 @@ enum osmo_gsup_iei { OSMO_GSUP_SM_RP_CAUSE_IE = 0x44, OSMO_GSUP_SM_RP_MMS_IE = 0x45, OSMO_GSUP_SM_ALERT_RSN_IE = 0x46, + + _OSMO_GSUP_IEI_END_MARKER }; /*! GSUP message type */ -- cgit v1.2.3