From e842ca263106bd65a47d9c6b205ae7a47aee023c Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Wed, 23 Oct 2024 18:59:56 +0200 Subject: [PATCH] Move assert up in decode_5gs_mobile_identity --- openair3/NAS/NR_UE/5GS/5GMM/IES/FGSMobileIdentity.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSMobileIdentity.c b/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSMobileIdentity.c index ddd6ba6bc9..883c5ba98d 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSMobileIdentity.c +++ b/openair3/NAS/NR_UE/5GS/5GMM/IES/FGSMobileIdentity.c @@ -113,11 +113,9 @@ int decode_5gs_mobile_identity(FGSMobileIdentity *fgsmobileidentity, uint8_t iei uint8_t typeofidentity = *(buffer + decoded) & 0x7; - if (typeofidentity == FGS_MOBILE_IDENTITY_5G_GUTI) { + AssertFatal(typeofidentity == FGS_MOBILE_IDENTITY_5G_GUTI, "Mobile Identity encoding of type %d not implemented\n", typeofidentity); + if (typeofidentity == FGS_MOBILE_IDENTITY_5G_GUTI) decoded_rc = decode_guti_5gs_mobile_identity(&fgsmobileidentity->guti, buffer + decoded); - } else { - AssertFatal(false, "Mobile Identity encoding of type %d not implemented\n", typeofidentity); - } if (decoded_rc < 0) { return decoded_rc;