aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-21 18:30:19 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-02-21 18:32:10 +0100
commitee34de141cb794b0859975c387418e1afa56b3bf (patch)
tree8cb0a30ada0cf4e239fda5cb384d3a0570f3ac3f /tests
parent731930b6720c82f12dab4556ef6946335f24cf4f (diff)
sgsn_test: guard against struct gprs_ra_id changing
sgsn_test initializes various struct gprs_ra_id without naming the actual members, which is vulnerable to struct member re-ordering. Name the members explicitly. An upcoming ABI change in libosmocore would cause test failures here without this patch. Change-Id: I517ed9edf77fac37d9de7a39df24c419a8a65d96
Diffstat (limited to 'tests')
-rw-r--r--tests/sgsn/sgsn_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c
index 42373499..2fbd6e4f 100644
--- a/tests/sgsn/sgsn_test.c
+++ b/tests/sgsn/sgsn_test.c
@@ -1644,7 +1644,7 @@ static void test_gmm_cancel(void)
*/
static void test_gmm_ptmsi_allocation(void)
{
- struct gprs_ra_id raid = {332, 112, 16464, 96};
+ struct gprs_ra_id raid = { .mnc=332, .mcc=112, .lac=16464, .rac=96};
struct sgsn_mm_ctx *ctx = NULL;
struct sgsn_mm_ctx *ictx;
uint32_t foreign_tlli;
@@ -1847,8 +1847,8 @@ static void test_gmm_ptmsi_allocation(void)
*/
static void test_gmm_routing_areas(void)
{
- struct gprs_ra_id raid1 = {332, 112, 16464, 96};
- struct gprs_ra_id raid2 = {332, 112, 16464, 97};
+ struct gprs_ra_id raid1 = { .mnc=332, .mcc=112, .lac=16464, .rac=96};
+ struct gprs_ra_id raid2 = { .mnc=332, .mcc=112, .lac=16464, .rac=97};
struct sgsn_mm_ctx *ctx = NULL;
struct sgsn_mm_ctx *ictx;
uint32_t ptmsi1;