From a84dac3d432b25a308221f830efe1eaa7b2301e6 Mon Sep 17 00:00:00 2001 From: Kevin Jhang Date: Fri, 12 Nov 2021 10:40:25 +0800 Subject: [PATCH] - fixed compiler error: undefined identifier --- src/mms/iso_mms/common/mms_value.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/mms/iso_mms/common/mms_value.c b/src/mms/iso_mms/common/mms_value.c index f45cae43..3fc5eda2 100644 --- a/src/mms/iso_mms/common/mms_value.c +++ b/src/mms/iso_mms/common/mms_value.c @@ -98,6 +98,17 @@ MmsValue_newUnsignedFromBerInteger(Asn1PrimitiveValue* berInteger) return self; } +bool +equalType(const MmsValue* self, const MmsValue* otherValue) +{ + if (self->type == otherValue->type || + (self->type == MMS_STRUCTURE && otherValue->type == MMS_ARRAY) || + (self->type == MMS_ARRAY && otherValue->type == MMS_STRUCTURE)) + return true; + + return false; +} + bool MmsValue_equals(const MmsValue* self, const MmsValue* otherValue) { @@ -190,23 +201,13 @@ MmsValue_equals(const MmsValue* self, const MmsValue* otherValue) return false; } -static bool -equalType(const MmsValue* self, const MmsValue* otherValue) { - if (self->type == otherValue->type || - (self->type == MMS_STRUCTURE && otherValue->type == MMS_ARRAY) || - (self->type == MMS_ARRAY && otherValue->type == MMS_STRUCTURE)) - return true; - - return false; -} - bool MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue) { if ((self == NULL) || (otherValue == NULL)) return false; - if (equalType(self ,otherValue)) { + if (equalType(self, otherValue)) { switch (self->type) {