From: Alberto Leiva Popper Date: Thu, 23 May 2024 22:16:15 +0000 (-0600) Subject: Fix most of the -Wnon-pointer-null violations X-Git-Tag: 1.6.2~3 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=dcbea9b681e22ad70398f24b88954924054a8ec8;p=thirdparty%2FFORT-validator.git Fix most of the -Wnon-pointer-null violations The cgcc review no longer needs -Wno-non-pointer-null. --- diff --git a/src/asn1/asn1c/ANY.c b/src/asn1/asn1c/ANY.c index 3c0e10bd..a8894600 100644 --- a/src/asn1/asn1c/ANY.c +++ b/src/asn1/asn1c/ANY.c @@ -26,15 +26,15 @@ asn_TYPE_operation_t asn_OP_ANY = { OCTET_STRING_encode_der, OCTET_STRING_encode_json, ANY_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_ANY = { "ANY", "ANY", &asn_OP_ANY, - 0, 0, 0, 0, - { 0, 0, asn_generic_no_constraint }, /* No constraints */ - 0, 0, /* No members */ + NULL, 0, NULL, 0, + { NULL, NULL, asn_generic_no_constraint }, /* No constraints */ + NULL, 0, /* No members */ &asn_SPC_ANY_specs, }; @@ -87,7 +87,7 @@ ANY_fromType(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) { } arg.offset = arg.size = 0; - arg.buffer = 0; + arg.buffer = NULL; erval = der_encode(td, sptr, ANY__consume_bytes, &arg); if(erval.encoded == -1) { @@ -110,12 +110,12 @@ ANY_new_fromType(asn_TYPE_descriptor_t *td, void *sptr) { if(!td || !sptr) { errno = EINVAL; - return 0; + return NULL; } memset(&tmp, 0, sizeof(tmp)); - if(ANY_fromType(&tmp, td, sptr)) return 0; + if(ANY_fromType(&tmp, td, sptr)) return NULL; st = (ANY_t *)CALLOC(1, sizeof(ANY_t)); if(st) { @@ -123,21 +123,21 @@ ANY_new_fromType(asn_TYPE_descriptor_t *td, void *sptr) { return st; } else { FREEMEM(tmp.buf); - return 0; + return NULL; } } int ANY_to_type(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) { asn_dec_rval_t rval; - void *newst = 0; + void *newst = NULL; if(!st || !td || !struct_ptr) { errno = EINVAL; return -1; } - if(st->buf == 0) { + if(st->buf == NULL) { /* Nothing to convert, make it empty. */ *struct_ptr = (void *)0; return 0; diff --git a/src/asn1/asn1c/ASId.c b/src/asn1/asn1c/ASId.c index d9ee1c1f..c660cd1a 100644 --- a/src/asn1/asn1c/ASId.c +++ b/src/asn1/asn1c/ASId.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_ASId = { asn_DEF_ASId_tags_1, /* Same as above */ sizeof(asn_DEF_ASId_tags_1) /sizeof(asn_DEF_ASId_tags_1[0]), /* 1 */ - { 0, 0, INTEGER_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, INTEGER_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/ASIdOrRange.c b/src/asn1/asn1c/ASIdOrRange.c index 53f96411..33a0b2c6 100644 --- a/src/asn1/asn1c/ASIdOrRange.c +++ b/src/asn1/asn1c/ASIdOrRange.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_ASIdOrRange_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_ASId, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct ASIdOrRange, choice.range), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ASRange, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "range" }, }; @@ -44,11 +44,11 @@ asn_TYPE_descriptor_t asn_DEF_ASIdOrRange = { "ASIdOrRange", "ASIdOrRange", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_ASIdOrRange_1, 2, /* Elements count */ &asn_SPC_ASIdOrRange_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/ASIdentifierChoice.c b/src/asn1/asn1c/ASIdentifierChoice.c index 1d4eae4f..83cea854 100644 --- a/src/asn1/asn1c/ASIdentifierChoice.c +++ b/src/asn1/asn1c/ASIdentifierChoice.c @@ -12,9 +12,9 @@ static asn_TYPE_member_t asn_MBR_asIdsOrRanges_3[] = { -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_ASIdOrRange, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -37,7 +37,7 @@ asn_TYPE_descriptor_t asn_DEF_asIdsOrRanges_3 = { asn_DEF_asIdsOrRanges_tags_3, /* Same as above */ sizeof(asn_DEF_asIdsOrRanges_tags_3) /sizeof(asn_DEF_asIdsOrRanges_tags_3[0]), /* 1 */ - { 0, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_asIdsOrRanges_3, 1, /* Single element */ &asn_SPC_asIdsOrRanges_specs_3 /* Additional specs */ @@ -48,18 +48,18 @@ asn_TYPE_member_t asn_MBR_ASIdentifierChoice_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, &asn_DEF_NULL, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "inherit" }, { ATF_NOFLAGS, 0, offsetof(struct ASIdentifierChoice, choice.asIdsOrRanges), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_asIdsOrRanges_3, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "asIdsOrRanges" }, }; @@ -80,11 +80,11 @@ asn_TYPE_descriptor_t asn_DEF_ASIdentifierChoice = { "ASIdentifierChoice", "ASIdentifierChoice", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_ASIdentifierChoice_1, 2, /* Elements count */ &asn_SPC_ASIdentifierChoice_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/ASIdentifiers.c b/src/asn1/asn1c/ASIdentifiers.c index b059cd58..58c0e532 100644 --- a/src/asn1/asn1c/ASIdentifiers.c +++ b/src/asn1/asn1c/ASIdentifiers.c @@ -12,18 +12,18 @@ static asn_TYPE_member_t asn_MBR_ASIdentifiers_1[] = { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_ASIdentifierChoice, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "asnum" }, { ATF_POINTER, 1, offsetof(struct ASIdentifiers, rdi), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_ASIdentifierChoice, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "rdi" }, }; @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_ASIdentifiers = { asn_DEF_ASIdentifiers_tags_1, /* Same as above */ sizeof(asn_DEF_ASIdentifiers_tags_1) /sizeof(asn_DEF_ASIdentifiers_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_ASIdentifiers_1, 2, /* Elements count */ &asn_SPC_ASIdentifiers_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/ASRange.c b/src/asn1/asn1c/ASRange.c index 8731a145..388f0f06 100644 --- a/src/asn1/asn1c/ASRange.c +++ b/src/asn1/asn1c/ASRange.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_ASRange_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_ASId, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "min" }, { ATF_NOFLAGS, 0, offsetof(struct ASRange, max), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_ASId, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "max" }, }; @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_ASRange = { asn_DEF_ASRange_tags_1, /* Same as above */ sizeof(asn_DEF_ASRange_tags_1) /sizeof(asn_DEF_ASRange_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_ASRange_1, 2, /* Elements count */ &asn_SPC_ASRange_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/AlgorithmIdentifier.c b/src/asn1/asn1c/AlgorithmIdentifier.c index 36c3c7a4..d2666acd 100644 --- a/src/asn1/asn1c/AlgorithmIdentifier.c +++ b/src/asn1/asn1c/AlgorithmIdentifier.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_AlgorithmIdentifier_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_OBJECT_IDENTIFIER, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "algorithm" }, { ATF_ANY_TYPE | ATF_POINTER, 1, offsetof(struct AlgorithmIdentifier, parameters), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_ANY, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "parameters" }, }; @@ -50,7 +50,7 @@ asn_TYPE_descriptor_t asn_DEF_AlgorithmIdentifier = { asn_DEF_AlgorithmIdentifier_tags_1, /* Same as above */ sizeof(asn_DEF_AlgorithmIdentifier_tags_1) /sizeof(asn_DEF_AlgorithmIdentifier_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_AlgorithmIdentifier_1, 2, /* Elements count */ &asn_SPC_AlgorithmIdentifier_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/AttributeType.c b/src/asn1/asn1c/AttributeType.c index 16a68cfa..662123b8 100644 --- a/src/asn1/asn1c/AttributeType.c +++ b/src/asn1/asn1c/AttributeType.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_AttributeType = { asn_DEF_AttributeType_tags_1, /* Same as above */ sizeof(asn_DEF_AttributeType_tags_1) /sizeof(asn_DEF_AttributeType_tags_1[0]), /* 1 */ - { 0, 0, OBJECT_IDENTIFIER_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, OBJECT_IDENTIFIER_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/AttributeTypeAndValue.c b/src/asn1/asn1c/AttributeTypeAndValue.c index 7e56bcf0..6cb690f8 100644 --- a/src/asn1/asn1c/AttributeTypeAndValue.c +++ b/src/asn1/asn1c/AttributeTypeAndValue.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_AttributeTypeAndValue_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_AttributeType, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "type" }, { ATF_ANY_TYPE | ATF_NOFLAGS, 0, offsetof(struct AttributeTypeAndValue, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_AttributeValue, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "value" }, }; @@ -50,7 +50,7 @@ asn_TYPE_descriptor_t asn_DEF_AttributeTypeAndValue = { asn_DEF_AttributeTypeAndValue_tags_1, /* Same as above */ sizeof(asn_DEF_AttributeTypeAndValue_tags_1) /sizeof(asn_DEF_AttributeTypeAndValue_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_AttributeTypeAndValue_1, 2, /* Elements count */ &asn_SPC_AttributeTypeAndValue_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/AttributeValue.c b/src/asn1/asn1c/AttributeValue.c index a16615b7..2cea1db8 100644 --- a/src/asn1/asn1c/AttributeValue.c +++ b/src/asn1/asn1c/AttributeValue.c @@ -15,11 +15,11 @@ asn_TYPE_descriptor_t asn_DEF_AttributeValue = { "AttributeValue", "AttributeValue", &asn_OP_ANY, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, ANY_constraint }, - 0, 0, /* No members */ + { NULL, NULL, ANY_constraint }, + NULL, 0, /* No members */ &asn_SPC_ANY_specs /* Additional specs */ }; diff --git a/src/asn1/asn1c/BIT_STRING.c b/src/asn1/asn1c/BIT_STRING.c index fbca75be..5421ba08 100644 --- a/src/asn1/asn1c/BIT_STRING.c +++ b/src/asn1/asn1c/BIT_STRING.c @@ -29,7 +29,7 @@ asn_TYPE_operation_t asn_OP_BIT_STRING = { OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ OCTET_STRING_encode_json, /* Implemented in terms of OCTET STRING */ BIT_STRING_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_BIT_STRING = { "BIT STRING", @@ -41,8 +41,8 @@ asn_TYPE_descriptor_t asn_DEF_BIT_STRING = { asn_DEF_BIT_STRING_tags, /* Same as above */ sizeof(asn_DEF_BIT_STRING_tags) / sizeof(asn_DEF_BIT_STRING_tags[0]), - { 0, 0, BIT_STRING_constraint }, - 0, 0, /* No members */ + { NULL, NULL, BIT_STRING_constraint }, + NULL, 0, /* No members */ &asn_SPC_BIT_STRING_specs }; diff --git a/src/asn1/asn1c/BOOLEAN.c b/src/asn1/asn1c/BOOLEAN.c index e825aec4..95706a1c 100644 --- a/src/asn1/asn1c/BOOLEAN.c +++ b/src/asn1/asn1c/BOOLEAN.c @@ -24,7 +24,7 @@ asn_TYPE_operation_t asn_OP_BOOLEAN = { BOOLEAN_encode_der, BOOLEAN_encode_json, BOOLEAN_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_BOOLEAN = { "BOOLEAN", @@ -34,9 +34,9 @@ asn_TYPE_descriptor_t asn_DEF_BOOLEAN = { sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]), asn_DEF_BOOLEAN_tags, /* Same as above */ sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]), - { 0, 0, asn_generic_no_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, asn_generic_no_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; /* @@ -66,8 +66,8 @@ BOOLEAN_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, /* * Check tags. */ - rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, - tag_mode, 0, &length, 0); + rval = ber_check_tags(opt_codec_ctx, td, NULL, buf_ptr, size, + tag_mode, 0, &length, NULL); if(rval.code != RC_OK) return rval; @@ -147,7 +147,7 @@ asn_enc_rval_t BOOLEAN_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, int flags, asn_app_consume_bytes_f *cb, void *app_key) { const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; - asn_enc_rval_t er = {0, 0, 0}; + asn_enc_rval_t er = {0, NULL, NULL}; (void)ilevel; (void)flags; diff --git a/src/asn1/asn1c/BinarySigningTime.c b/src/asn1/asn1c/BinarySigningTime.c index 7b93b310..4fc2f0ce 100644 --- a/src/asn1/asn1c/BinarySigningTime.c +++ b/src/asn1/asn1c/BinarySigningTime.c @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_BinarySigningTime = { asn_DEF_BinarySigningTime_tags_1, /* Same as above */ sizeof(asn_DEF_BinarySigningTime_tags_1) /sizeof(asn_DEF_BinarySigningTime_tags_1[0]), /* 1 */ - { NULL, 0, BinarySigningTime_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, BinarySigningTime_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/BinaryTime.c b/src/asn1/asn1c/BinaryTime.c index 16fd2bcd..3de8800c 100644 --- a/src/asn1/asn1c/BinaryTime.c +++ b/src/asn1/asn1c/BinaryTime.c @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_BinaryTime = { asn_DEF_BinaryTime_tags_1, /* Same as above */ sizeof(asn_DEF_BinaryTime_tags_1) /sizeof(asn_DEF_BinaryTime_tags_1[0]), /* 1 */ - { NULL, 0, BinaryTime_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, BinaryTime_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/CMSAttribute.c b/src/asn1/asn1c/CMSAttribute.c index 5b0a2684..79c755d1 100644 --- a/src/asn1/asn1c/CMSAttribute.c +++ b/src/asn1/asn1c/CMSAttribute.c @@ -14,7 +14,7 @@ #include "asn1/asn1c/SigningTime.h" #include "json_util.h" -json_t * +static json_t * CMSAttribute_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr) { struct CMSAttribute const *cattr = sptr; @@ -63,7 +63,7 @@ fail: json_decref(root); return NULL; } -asn_TYPE_operation_t asn_OP_CMSAttribute = { +static asn_TYPE_operation_t asn_OP_CMSAttribute = { SEQUENCE_free, SEQUENCE_print, SEQUENCE_compare, @@ -71,7 +71,7 @@ asn_TYPE_operation_t asn_OP_CMSAttribute = { SEQUENCE_encode_der, CMSAttribute_encode_json, SEQUENCE_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; static asn_TYPE_member_t asn_MBR_attrValues_3[] = { @@ -79,9 +79,9 @@ static asn_TYPE_member_t asn_MBR_attrValues_3[] = { -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_CMSAttributeValue, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -104,7 +104,7 @@ asn_TYPE_descriptor_t asn_DEF_attrValues_3 = { asn_DEF_attrValues_tags_3, /* Same as above */ sizeof(asn_DEF_attrValues_tags_3) /sizeof(asn_DEF_attrValues_tags_3[0]), /* 1 */ - { 0, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_attrValues_3, 1, /* Single element */ &asn_SPC_attrValues_specs_3 /* Additional specs */ @@ -115,18 +115,18 @@ asn_TYPE_member_t asn_MBR_CMSAttribute_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_OBJECT_IDENTIFIER, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "attrType" }, { ATF_NOFLAGS, 0, offsetof(struct CMSAttribute, attrValues), (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, &asn_DEF_attrValues_3, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "attrValues" }, }; @@ -154,7 +154,7 @@ asn_TYPE_descriptor_t asn_DEF_CMSAttribute = { asn_DEF_CMSAttribute_tags_1, /* Same as above */ sizeof(asn_DEF_CMSAttribute_tags_1) /sizeof(asn_DEF_CMSAttribute_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_CMSAttribute_1, 2, /* Elements count */ &asn_SPC_CMSAttribute_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/CMSAttributeValue.c b/src/asn1/asn1c/CMSAttributeValue.c index fb5db6e0..5527f944 100644 --- a/src/asn1/asn1c/CMSAttributeValue.c +++ b/src/asn1/asn1c/CMSAttributeValue.c @@ -15,11 +15,11 @@ asn_TYPE_descriptor_t asn_DEF_CMSAttributeValue = { "CMSAttributeValue", "CMSAttributeValue", &asn_OP_ANY, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, ANY_constraint }, - 0, 0, /* No members */ + { NULL, NULL, ANY_constraint }, + NULL, 0, /* No members */ &asn_SPC_ANY_specs /* Additional specs */ }; diff --git a/src/asn1/asn1c/CMSSubjectKeyIdentifier.c b/src/asn1/asn1c/CMSSubjectKeyIdentifier.c index 77355f0d..feb4344d 100644 --- a/src/asn1/asn1c/CMSSubjectKeyIdentifier.c +++ b/src/asn1/asn1c/CMSSubjectKeyIdentifier.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_CMSSubjectKeyIdentifier = { asn_DEF_CMSSubjectKeyIdentifier_tags_1, /* Same as above */ sizeof(asn_DEF_CMSSubjectKeyIdentifier_tags_1) /sizeof(asn_DEF_CMSSubjectKeyIdentifier_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ + { NULL, NULL, OCTET_STRING_constraint }, + NULL, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/src/asn1/asn1c/CMSVersion.c b/src/asn1/asn1c/CMSVersion.c index 2122ac76..b8a2785b 100644 --- a/src/asn1/asn1c/CMSVersion.c +++ b/src/asn1/asn1c/CMSVersion.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_CMSVersion = { asn_DEF_CMSVersion_tags_1, /* Same as above */ sizeof(asn_DEF_CMSVersion_tags_1) /sizeof(asn_DEF_CMSVersion_tags_1[0]), /* 1 */ - { 0, 0, INTEGER_constraint }, - 0, 0, /* Defined elsewhere */ - 0 /* No specifics */ + { NULL, NULL, INTEGER_constraint }, + NULL, 0, /* Defined elsewhere */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/CertificateList.c b/src/asn1/asn1c/CertificateList.c index 6b653399..6fbc9f38 100644 --- a/src/asn1/asn1c/CertificateList.c +++ b/src/asn1/asn1c/CertificateList.c @@ -12,27 +12,27 @@ asn_TYPE_member_t asn_MBR_CertificateList_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_TBSCertList, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "tbsCertList" }, { ATF_NOFLAGS, 0, offsetof(struct CertificateList, signatureAlgorithm), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_AlgorithmIdentifier, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signatureAlgorithm" }, { ATF_NOFLAGS, 0, offsetof(struct CertificateList, signature), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_BIT_STRING, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signature" }, }; @@ -61,7 +61,7 @@ asn_TYPE_descriptor_t asn_DEF_CertificateList = { asn_DEF_CertificateList_tags_1, /* Same as above */ sizeof(asn_DEF_CertificateList_tags_1) /sizeof(asn_DEF_CertificateList_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_CertificateList_1, 3, /* Elements count */ &asn_SPC_CertificateList_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/CertificateSerialNumber.c b/src/asn1/asn1c/CertificateSerialNumber.c index e9c8428a..e9d9af6a 100644 --- a/src/asn1/asn1c/CertificateSerialNumber.c +++ b/src/asn1/asn1c/CertificateSerialNumber.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_CertificateSerialNumber = { asn_DEF_CertificateSerialNumber_tags_1, /* Same as above */ sizeof(asn_DEF_CertificateSerialNumber_tags_1) /sizeof(asn_DEF_CertificateSerialNumber_tags_1[0]), /* 1 */ - { 0, 0, INTEGER_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, INTEGER_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/CertificateSet.c b/src/asn1/asn1c/CertificateSet.c index d83c6dc6..a04e8b86 100644 --- a/src/asn1/asn1c/CertificateSet.c +++ b/src/asn1/asn1c/CertificateSet.c @@ -40,7 +40,7 @@ fail: json_decref(parent); return NULL; } -asn_TYPE_operation_t asn_OP_CertificateSet = { +static asn_TYPE_operation_t asn_OP_CertificateSet = { SET_OF_free, SET_OF_print, SET_OF_compare, @@ -48,7 +48,7 @@ asn_TYPE_operation_t asn_OP_CertificateSet = { SET_OF_encode_der, CertificateSet_encode_json, SET_OF_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_member_t asn_MBR_CertificateSet_1[] = { @@ -56,9 +56,9 @@ asn_TYPE_member_t asn_MBR_CertificateSet_1[] = { -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_ANY, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -80,7 +80,7 @@ asn_TYPE_descriptor_t asn_DEF_CertificateSet = { asn_DEF_CertificateSet_tags_1, /* Same as above */ sizeof(asn_DEF_CertificateSet_tags_1) /sizeof(asn_DEF_CertificateSet_tags_1[0]), /* 1 */ - { 0, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_CertificateSet_1, 1, /* Single element */ &asn_SPC_CertificateSet_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/ContentInfo.c b/src/asn1/asn1c/ContentInfo.c index 0a97f082..cb619e55 100644 --- a/src/asn1/asn1c/ContentInfo.c +++ b/src/asn1/asn1c/ContentInfo.c @@ -12,7 +12,7 @@ #include "asn1/asn1c/SignedData.h" #include "json_util.h" -json_t * +static json_t * ContentInfo_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr) { struct ContentInfo const *ci = sptr; @@ -47,7 +47,7 @@ fail: json_decref(parent); return NULL; } -asn_TYPE_operation_t asn_OP_ContentInfo = { +static asn_TYPE_operation_t asn_OP_ContentInfo = { SEQUENCE_free, SEQUENCE_print, SEQUENCE_compare, @@ -55,7 +55,7 @@ asn_TYPE_operation_t asn_OP_ContentInfo = { SEQUENCE_encode_der, ContentInfo_encode_json, SEQUENCE_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; static asn_TYPE_member_t asn_MBR_ContentInfo_1[] = { @@ -63,18 +63,18 @@ static asn_TYPE_member_t asn_MBR_ContentInfo_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_ContentType, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "contentType" }, { ATF_NOFLAGS, 0, offsetof(struct ContentInfo, content), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_ANY, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "content" }, }; @@ -102,7 +102,7 @@ asn_TYPE_descriptor_t asn_DEF_ContentInfo = { asn_DEF_ContentInfo_tags_1, /* Same as above */ sizeof(asn_DEF_ContentInfo_tags_1) /sizeof(asn_DEF_ContentInfo_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_ContentInfo_1, 2, /* Elements count */ &asn_SPC_ContentInfo_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/ContentType.c b/src/asn1/asn1c/ContentType.c index 37c24af9..efaa17dd 100644 --- a/src/asn1/asn1c/ContentType.c +++ b/src/asn1/asn1c/ContentType.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_ContentType = { asn_DEF_ContentType_tags_1, /* Same as above */ sizeof(asn_DEF_ContentType_tags_1) /sizeof(asn_DEF_ContentType_tags_1[0]), /* 1 */ - { 0, 0, OBJECT_IDENTIFIER_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, OBJECT_IDENTIFIER_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/ContentTypePKCS7.c b/src/asn1/asn1c/ContentTypePKCS7.c index b38a687c..91e1311f 100644 --- a/src/asn1/asn1c/ContentTypePKCS7.c +++ b/src/asn1/asn1c/ContentTypePKCS7.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_ContentTypePKCS7 = { asn_DEF_ContentTypePKCS7_tags_1, /* Same as above */ sizeof(asn_DEF_ContentTypePKCS7_tags_1) /sizeof(asn_DEF_ContentTypePKCS7_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ + { NULL, NULL, OCTET_STRING_constraint }, + NULL, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/src/asn1/asn1c/Countersignature.c b/src/asn1/asn1c/Countersignature.c index 8e9124ed..bf3d468b 100644 --- a/src/asn1/asn1c/Countersignature.c +++ b/src/asn1/asn1c/Countersignature.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_Countersignature = { asn_DEF_Countersignature_tags_1, /* Same as above */ sizeof(asn_DEF_Countersignature_tags_1) /sizeof(asn_DEF_Countersignature_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_SignerInfo_1, 7, /* Elements count */ &asn_SPC_SignerInfo_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/DigestAlgorithmIdentifier.c b/src/asn1/asn1c/DigestAlgorithmIdentifier.c index 0fe7f2bc..4969edf7 100644 --- a/src/asn1/asn1c/DigestAlgorithmIdentifier.c +++ b/src/asn1/asn1c/DigestAlgorithmIdentifier.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_DigestAlgorithmIdentifier = { asn_DEF_DigestAlgorithmIdentifier_tags_1, /* Same as above */ sizeof(asn_DEF_DigestAlgorithmIdentifier_tags_1) /sizeof(asn_DEF_DigestAlgorithmIdentifier_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_AlgorithmIdentifier_1, 2, /* Elements count */ &asn_SPC_AlgorithmIdentifier_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/DigestAlgorithmIdentifiers.c b/src/asn1/asn1c/DigestAlgorithmIdentifiers.c index ef4e770d..86406cb0 100644 --- a/src/asn1/asn1c/DigestAlgorithmIdentifiers.c +++ b/src/asn1/asn1c/DigestAlgorithmIdentifiers.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_DigestAlgorithmIdentifiers_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_DigestAlgorithmIdentifier, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_DigestAlgorithmIdentifiers = { asn_DEF_DigestAlgorithmIdentifiers_tags_1, /* Same as above */ sizeof(asn_DEF_DigestAlgorithmIdentifiers_tags_1) /sizeof(asn_DEF_DigestAlgorithmIdentifiers_tags_1[0]), /* 1 */ - { 0, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_DigestAlgorithmIdentifiers_1, 1, /* Single element */ &asn_SPC_DigestAlgorithmIdentifiers_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/DistinguishedName.c b/src/asn1/asn1c/DistinguishedName.c index f55032a6..38beeed5 100644 --- a/src/asn1/asn1c/DistinguishedName.c +++ b/src/asn1/asn1c/DistinguishedName.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_DistinguishedName = { asn_DEF_DistinguishedName_tags_1, /* Same as above */ sizeof(asn_DEF_DistinguishedName_tags_1) /sizeof(asn_DEF_DistinguishedName_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_RDNSequence_1, 1, /* Single element */ &asn_SPC_RDNSequence_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/EncapsulatedContentInfo.c b/src/asn1/asn1c/EncapsulatedContentInfo.c index bc9f7c4e..47fe7c02 100644 --- a/src/asn1/asn1c/EncapsulatedContentInfo.c +++ b/src/asn1/asn1c/EncapsulatedContentInfo.c @@ -12,7 +12,7 @@ #include "json_util.h" #include "nid.h" -json_t * +static json_t * EncapsulatedContentInfo_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr) { @@ -57,7 +57,7 @@ fail: json_decref(parent); return NULL; } -asn_TYPE_operation_t asn_OP_EncapsulatedContentInfo = { +static asn_TYPE_operation_t asn_OP_EncapsulatedContentInfo = { SEQUENCE_free, SEQUENCE_print, SEQUENCE_compare, @@ -65,7 +65,7 @@ asn_TYPE_operation_t asn_OP_EncapsulatedContentInfo = { SEQUENCE_encode_der, EncapsulatedContentInfo_encode_json, SEQUENCE_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_member_t asn_MBR_EncapsulatedContentInfo_1[] = { @@ -73,18 +73,18 @@ asn_TYPE_member_t asn_MBR_EncapsulatedContentInfo_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_ContentType, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "eContentType" }, { ATF_POINTER, 1, offsetof(struct EncapsulatedContentInfo, eContent), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_OCTET_STRING, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "eContent" }, }; @@ -112,7 +112,7 @@ asn_TYPE_descriptor_t asn_DEF_EncapsulatedContentInfo = { asn_DEF_EncapsulatedContentInfo_tags_1, /* Same as above */ sizeof(asn_DEF_EncapsulatedContentInfo_tags_1) /sizeof(asn_DEF_EncapsulatedContentInfo_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_EncapsulatedContentInfo_1, 2, /* Elements count */ &asn_SPC_EncapsulatedContentInfo_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/EncapsulatedContentInfoPKCS7.c b/src/asn1/asn1c/EncapsulatedContentInfoPKCS7.c index 60b9a727..7f591a12 100644 --- a/src/asn1/asn1c/EncapsulatedContentInfoPKCS7.c +++ b/src/asn1/asn1c/EncapsulatedContentInfoPKCS7.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_EncapsulatedContentInfoPKCS7_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_ContentType, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "eContentType" }, { ATF_POINTER, 1, offsetof(struct EncapsulatedContentInfoPKCS7, eContent), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_ANY, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "eContent" }, }; @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_EncapsulatedContentInfoPKCS7 = { asn_DEF_EncapsulatedContentInfoPKCS7_tags_1, /* Same as above */ sizeof(asn_DEF_EncapsulatedContentInfoPKCS7_tags_1) /sizeof(asn_DEF_EncapsulatedContentInfoPKCS7_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_EncapsulatedContentInfoPKCS7_1, 2, /* Elements count */ &asn_SPC_EncapsulatedContentInfoPKCS7_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/Extension.c b/src/asn1/asn1c/Extension.c index b868c88c..a650a177 100644 --- a/src/asn1/asn1c/Extension.c +++ b/src/asn1/asn1c/Extension.c @@ -36,17 +36,17 @@ asn_TYPE_member_t asn_MBR_Extension_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_OBJECT_IDENTIFIER, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "extnID" }, { ATF_NOFLAGS, 1, offsetof(struct Extension, critical), (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, &asn_DEF_BOOLEAN, - 0, - { 0, 0, 0 }, + NULL, + { NULL, NULL, NULL }, &asn_DFL_3_cmp_0, /* Compare DEFAULT 0 */ &asn_DFL_3_set_0, /* Set DEFAULT 0 */ "critical" @@ -55,9 +55,9 @@ asn_TYPE_member_t asn_MBR_Extension_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "extnValue" }, }; @@ -86,7 +86,7 @@ asn_TYPE_descriptor_t asn_DEF_Extension = { asn_DEF_Extension_tags_1, /* Same as above */ sizeof(asn_DEF_Extension_tags_1) /sizeof(asn_DEF_Extension_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_Extension_1, 3, /* Elements count */ &asn_SPC_Extension_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/Extensions.c b/src/asn1/asn1c/Extensions.c index f9926802..d5e02c3c 100644 --- a/src/asn1/asn1c/Extensions.c +++ b/src/asn1/asn1c/Extensions.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_Extensions_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_Extension, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_Extensions = { asn_DEF_Extensions_tags_1, /* Same as above */ sizeof(asn_DEF_Extensions_tags_1) /sizeof(asn_DEF_Extensions_tags_1[0]), /* 1 */ - { NULL, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_Extensions_1, 1, /* Single element */ &asn_SPC_Extensions_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/FileAndHash.c b/src/asn1/asn1c/FileAndHash.c index 89367798..b63b6dca 100644 --- a/src/asn1/asn1c/FileAndHash.c +++ b/src/asn1/asn1c/FileAndHash.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_FileAndHash_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, &asn_DEF_IA5String, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "file" }, { ATF_NOFLAGS, 0, offsetof(struct FileAndHash, hash), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_BIT_STRING, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "hash" }, }; @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_FileAndHash = { asn_DEF_FileAndHash_tags_1, /* Same as above */ sizeof(asn_DEF_FileAndHash_tags_1) /sizeof(asn_DEF_FileAndHash_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_FileAndHash_1, 2, /* Elements count */ &asn_SPC_FileAndHash_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/GeneralizedTime.c b/src/asn1/asn1c/GeneralizedTime.c index 8bee55a1..f61a7527 100644 --- a/src/asn1/asn1c/GeneralizedTime.c +++ b/src/asn1/asn1c/GeneralizedTime.c @@ -63,7 +63,7 @@ asn_TYPE_operation_t asn_OP_GeneralizedTime = { GeneralizedTime_encode_der, GeneralizedTime_encode_json, GeneralizedTime_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = { "GeneralizedTime", @@ -75,9 +75,9 @@ asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = { asn_DEF_GeneralizedTime_tags, sizeof(asn_DEF_GeneralizedTime_tags) / sizeof(asn_DEF_GeneralizedTime_tags[0]), - { 0, NULL, GeneralizedTime_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, GeneralizedTime_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; #endif /* ASN___INTERNAL_TEST_MODE */ @@ -129,7 +129,7 @@ GeneralizedTime_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, ASN__ENCODE_FAILED; } - st = asn_time2GT_frac(0, &tm, fv, fd); /* Save time */ + st = asn_time2GT_frac(NULL, &tm, fv, fd); /* Save time */ if(!st) ASN__ENCODE_FAILED; /* Memory allocation failure. */ erval = OCTET_STRING_encode_der(td, st, tag_mode, tag, cb, app_key); @@ -170,7 +170,7 @@ GeneralizedTime_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, &fv, &fd, &tm) != 0) ASN__ENCODE_FAILED; - gt = asn_time2GT_frac(0, &tm, fv, fd); + gt = asn_time2GT_frac(NULL, &tm, fv, fd); if(!gt) ASN__ENCODE_FAILED; rv = OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags, @@ -220,7 +220,7 @@ asn_tm2str(struct tm *tm, char *str) int asn_GT2time(const GeneralizedTime_t *st, struct tm *ret_tm) { - return asn_GT2time_frac(st, 0, 0, ret_tm); + return asn_GT2time_frac(st, NULL, NULL, ret_tm); } time_t @@ -231,7 +231,7 @@ asn_GT2time_prec(const GeneralizedTime_t *st, int *frac_value, int frac_digits, if(frac_value) tloc = asn_GT2time_frac(st, &fv, &fd, ret_tm); else - return asn_GT2time_frac(st, 0, 0, ret_tm); + return asn_GT2time_frac(st, NULL, NULL, ret_tm); if(fd == 0 || frac_digits <= 0) { *frac_value = 0; } else { @@ -438,12 +438,12 @@ asn_time2GT_frac(GeneralizedTime_t *opt_gt, const struct tm *tm, int frac_value, /* Check arguments */ if(!tm) { errno = EINVAL; - return 0; + return NULL; } /* Pre-allocate a buffer of sufficient yet small length */ buf = (char *)MALLOC(buf_size); - if(!buf) return 0; + if(!buf) return NULL; size = snprintf(buf, buf_size, "%04d%02d%02d%02d%02d%02d", tm->tm_year + 1900, @@ -457,7 +457,7 @@ asn_time2GT_frac(GeneralizedTime_t *opt_gt, const struct tm *tm, int frac_value, /* Could be assert(size == 14); */ FREEMEM(buf); errno = EINVAL; - return 0; + return NULL; } p = buf + size; @@ -481,7 +481,7 @@ asn_time2GT_frac(GeneralizedTime_t *opt_gt, const struct tm *tm, int frac_value, do { int digit = frac_value / fbase; - if(digit > 9) { z = 0; break; } + if(digit > 9) { z = NULL; break; } *z++ = digit + 0x30; frac_value %= fbase; fbase /= 10; @@ -502,7 +502,7 @@ asn_time2GT_frac(GeneralizedTime_t *opt_gt, const struct tm *tm, int frac_value, FREEMEM(opt_gt->buf); } else { opt_gt = (GeneralizedTime_t *)CALLOC(1, sizeof *opt_gt); - if(!opt_gt) { FREEMEM(buf); return 0; } + if(!opt_gt) { FREEMEM(buf); return NULL; } } opt_gt->buf = (unsigned char *)buf; @@ -530,10 +530,10 @@ GeneralizedTime_compare(const asn_TYPE_descriptor_t *td, const void *aptr, time_t at, bt; errno = EPERM; - at = asn_GT2time_frac(a, &afrac_value, &afrac_digits, 0); + at = asn_GT2time_frac(a, &afrac_value, &afrac_digits, NULL); aerr = errno; errno = EPERM; - bt = asn_GT2time_frac(b, &bfrac_value, &bfrac_digits, 0); + bt = asn_GT2time_frac(b, &bfrac_value, &bfrac_digits, NULL); berr = errno; if(at == -1 && aerr != EPERM) { diff --git a/src/asn1/asn1c/IA5String.c b/src/asn1/asn1c/IA5String.c index 573f560e..2f5b93fa 100644 --- a/src/asn1/asn1c/IA5String.c +++ b/src/asn1/asn1c/IA5String.c @@ -19,7 +19,7 @@ asn_TYPE_operation_t asn_OP_IA5String = { OCTET_STRING_encode_der, OCTET_STRING_encode_json_utf8, OCTET_STRING_encode_xer_utf8, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_IA5String = { "IA5String", @@ -31,9 +31,9 @@ asn_TYPE_descriptor_t asn_DEF_IA5String = { asn_DEF_IA5String_tags, sizeof(asn_DEF_IA5String_tags) / sizeof(asn_DEF_IA5String_tags[0]), - { 0, NULL, IA5String_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, IA5String_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; int diff --git a/src/asn1/asn1c/INTEGER.c b/src/asn1/asn1c/INTEGER.c index 3885fd79..30a5d041 100644 --- a/src/asn1/asn1c/INTEGER.c +++ b/src/asn1/asn1c/INTEGER.c @@ -26,7 +26,7 @@ asn_TYPE_operation_t asn_OP_INTEGER = { INTEGER_encode_der, INTEGER_encode_json, INTEGER_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_INTEGER = { "INTEGER", @@ -36,9 +36,9 @@ asn_TYPE_descriptor_t asn_DEF_INTEGER = { sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), asn_DEF_INTEGER_tags, /* Same as above */ sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), - { 0, 0, asn_generic_no_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, asn_generic_no_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; /* @@ -130,7 +130,7 @@ INTEGER__dump(const asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_cons if(ret == 0) { const asn_INTEGER_enum_map_t *el; el = (value >= 0 || !specs || !specs->field_unsigned) - ? INTEGER_map_value2enum(specs, value) : 0; + ? INTEGER_map_value2enum(specs, value) : NULL; if(el) { if(plainOrXER == 0) return asn__format_to_callback(cb, app_key, @@ -215,7 +215,7 @@ INTEGER__compar_value2enum(const void *kp, const void *am) { const asn_INTEGER_enum_map_t * INTEGER_map_value2enum(const asn_INTEGER_specifics_t *specs, long value) { int count = specs ? specs->map_count : 0; - if(!count) return 0; + if(!count) return NULL; return (asn_INTEGER_enum_map_t *)bsearch(&value, specs->value2enum, count, sizeof(specs->value2enum[0]), INTEGER__compar_value2enum); diff --git a/src/asn1/asn1c/IPAddrBlocks.c b/src/asn1/asn1c/IPAddrBlocks.c index 4920331a..8a440885 100644 --- a/src/asn1/asn1c/IPAddrBlocks.c +++ b/src/asn1/asn1c/IPAddrBlocks.c @@ -12,9 +12,9 @@ static asn_TYPE_member_t asn_MBR_IPAddrBlocks_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_IPAddressFamily, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_IPAddrBlocks = { asn_DEF_IPAddrBlocks_tags_1, /* Same as above */ sizeof(asn_DEF_IPAddrBlocks_tags_1) /sizeof(asn_DEF_IPAddrBlocks_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_IPAddrBlocks_1, 1, /* Single element */ &asn_SPC_IPAddrBlocks_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/IPAddress.c b/src/asn1/asn1c/IPAddress.c index 26e35065..fac31f0e 100644 --- a/src/asn1/asn1c/IPAddress.c +++ b/src/asn1/asn1c/IPAddress.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_IPAddress = { asn_DEF_IPAddress_tags_1, /* Same as above */ sizeof(asn_DEF_IPAddress_tags_1) /sizeof(asn_DEF_IPAddress_tags_1[0]), /* 1 */ - { 0, 0, BIT_STRING_constraint }, - 0, 0, /* No members */ + { NULL, NULL, BIT_STRING_constraint }, + NULL, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; diff --git a/src/asn1/asn1c/IPAddressChoice.c b/src/asn1/asn1c/IPAddressChoice.c index 7dda5862..490dd454 100644 --- a/src/asn1/asn1c/IPAddressChoice.c +++ b/src/asn1/asn1c/IPAddressChoice.c @@ -12,9 +12,9 @@ static asn_TYPE_member_t asn_MBR_addressesOrRanges_3[] = { -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_IPAddressOrRange, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -37,7 +37,7 @@ asn_TYPE_descriptor_t asn_DEF_addressesOrRanges_3 = { asn_DEF_addressesOrRanges_tags_3, /* Same as above */ sizeof(asn_DEF_addressesOrRanges_tags_3) /sizeof(asn_DEF_addressesOrRanges_tags_3[0]), /* 1 */ - { 0, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_addressesOrRanges_3, 1, /* Single element */ &asn_SPC_addressesOrRanges_specs_3 /* Additional specs */ @@ -48,18 +48,18 @@ asn_TYPE_member_t asn_MBR_IPAddressChoice_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, &asn_DEF_NULL, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "inherit" }, { ATF_NOFLAGS, 0, offsetof(struct IPAddressChoice, choice.addressesOrRanges), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_addressesOrRanges_3, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "addressesOrRanges" }, }; @@ -80,11 +80,11 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressChoice = { "IPAddressChoice", "IPAddressChoice", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_IPAddressChoice_1, 2, /* Elements count */ &asn_SPC_IPAddressChoice_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/IPAddressFamily.c b/src/asn1/asn1c/IPAddressFamily.c index 165d4c5d..26a4a228 100644 --- a/src/asn1/asn1c/IPAddressFamily.c +++ b/src/asn1/asn1c/IPAddressFamily.c @@ -38,18 +38,18 @@ asn_TYPE_member_t asn_MBR_IPAddressFamily_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, - 0, - { NULL, 0, memb_addressFamily_constraint_1 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, memb_addressFamily_constraint_1 }, + NULL, NULL, /* No default value */ "addressFamily" }, { ATF_NOFLAGS, 0, offsetof(struct IPAddressFamily, ipAddressChoice), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_IPAddressChoice, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "ipAddressChoice" }, }; @@ -78,7 +78,7 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressFamily = { asn_DEF_IPAddressFamily_tags_1, /* Same as above */ sizeof(asn_DEF_IPAddressFamily_tags_1) /sizeof(asn_DEF_IPAddressFamily_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_IPAddressFamily_1, 2, /* Elements count */ &asn_SPC_IPAddressFamily_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/IPAddressOrRange.c b/src/asn1/asn1c/IPAddressOrRange.c index 7ba3e63d..7108a45a 100644 --- a/src/asn1/asn1c/IPAddressOrRange.c +++ b/src/asn1/asn1c/IPAddressOrRange.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_IPAddressOrRange_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_IPAddress, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "addressPrefix" }, { ATF_NOFLAGS, 0, offsetof(struct IPAddressOrRange, choice.addressRange), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_IPAddressRange, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "addressRange" }, }; @@ -44,11 +44,11 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressOrRange = { "IPAddressOrRange", "IPAddressOrRange", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_IPAddressOrRange_1, 2, /* Elements count */ &asn_SPC_IPAddressOrRange_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/IPAddressRange.c b/src/asn1/asn1c/IPAddressRange.c index 46063f9e..86f5d277 100644 --- a/src/asn1/asn1c/IPAddressRange.c +++ b/src/asn1/asn1c/IPAddressRange.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_IPAddressRange_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_IPAddress, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "min" }, { ATF_NOFLAGS, 0, offsetof(struct IPAddressRange, max), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_IPAddress, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "max" }, }; @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_IPAddressRange = { asn_DEF_IPAddressRange_tags_1, /* Same as above */ sizeof(asn_DEF_IPAddressRange_tags_1) /sizeof(asn_DEF_IPAddressRange_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_IPAddressRange_1, 2, /* Elements count */ &asn_SPC_IPAddressRange_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/IssuerAndSerialNumber.c b/src/asn1/asn1c/IssuerAndSerialNumber.c index 0b9dbd4a..979d18c1 100644 --- a/src/asn1/asn1c/IssuerAndSerialNumber.c +++ b/src/asn1/asn1c/IssuerAndSerialNumber.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_IssuerAndSerialNumber_1[] = { -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Name, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "issuer" }, { ATF_NOFLAGS, 0, offsetof(struct IssuerAndSerialNumber, serialNumber), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_CertificateSerialNumber, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "serialNumber" }, }; @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_IssuerAndSerialNumber = { asn_DEF_IssuerAndSerialNumber_tags_1, /* Same as above */ sizeof(asn_DEF_IssuerAndSerialNumber_tags_1) /sizeof(asn_DEF_IssuerAndSerialNumber_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_IssuerAndSerialNumber_1, 2, /* Elements count */ &asn_SPC_IssuerAndSerialNumber_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/Manifest.c b/src/asn1/asn1c/Manifest.c index 1ae4f76d..29069a5c 100644 --- a/src/asn1/asn1c/Manifest.c +++ b/src/asn1/asn1c/Manifest.c @@ -84,9 +84,9 @@ static asn_TYPE_member_t asn_MBR_fileList_7[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_FileAndHash, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -109,7 +109,7 @@ asn_TYPE_descriptor_t asn_DEF_fileList_7 = { asn_DEF_fileList_tags_7, /* Same as above */ sizeof(asn_DEF_fileList_tags_7) /sizeof(asn_DEF_fileList_tags_7[0]), /* 1 */ - { NULL, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_fileList_7, 1, /* Single element */ &asn_SPC_fileList_specs_7 /* Additional specs */ @@ -120,8 +120,8 @@ static asn_TYPE_member_t asn_MBR_Manifest_1[] = { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_INTEGER, - 0, - { 0, 0, 0 }, + NULL, + { NULL, NULL, NULL }, &asn_DFL_2_cmp_0, /* Compare DEFAULT 0 */ &asn_DFL_2_set_0, /* Set DEFAULT 0 */ "version" @@ -130,45 +130,45 @@ static asn_TYPE_member_t asn_MBR_Manifest_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_INTEGER, - 0, - { NULL, 0, memb_manifestNumber_constraint_1 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, memb_manifestNumber_constraint_1 }, + NULL, NULL, /* No default value */ "manifestNumber" }, { ATF_NOFLAGS, 0, offsetof(struct Manifest, thisUpdate), (ASN_TAG_CLASS_UNIVERSAL | (24 << 2)), 0, &asn_DEF_GeneralizedTime, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "thisUpdate" }, { ATF_NOFLAGS, 0, offsetof(struct Manifest, nextUpdate), (ASN_TAG_CLASS_UNIVERSAL | (24 << 2)), 0, &asn_DEF_GeneralizedTime, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "nextUpdate" }, { ATF_NOFLAGS, 0, offsetof(struct Manifest, fileHashAlg), (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_OBJECT_IDENTIFIER, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "fileHashAlg" }, { ATF_NOFLAGS, 0, offsetof(struct Manifest, fileList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_fileList_7, - 0, - { NULL, 0, memb_fileList_constraint_1 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, memb_fileList_constraint_1 }, + NULL, NULL, /* No default value */ "fileList" }, }; @@ -200,7 +200,7 @@ asn_TYPE_descriptor_t asn_DEF_Manifest = { asn_DEF_Manifest_tags_1, /* Same as above */ sizeof(asn_DEF_Manifest_tags_1) /sizeof(asn_DEF_Manifest_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_Manifest_1, 6, /* Elements count */ &asn_SPC_Manifest_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/MessageDigest.c b/src/asn1/asn1c/MessageDigest.c index 0794b84a..a44e323f 100644 --- a/src/asn1/asn1c/MessageDigest.c +++ b/src/asn1/asn1c/MessageDigest.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_MessageDigest = { asn_DEF_MessageDigest_tags_1, /* Same as above */ sizeof(asn_DEF_MessageDigest_tags_1) /sizeof(asn_DEF_MessageDigest_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ + { NULL, NULL, OCTET_STRING_constraint }, + NULL, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/src/asn1/asn1c/NULL.c b/src/asn1/asn1c/NULL.c index 7daf9247..477eb0f5 100644 --- a/src/asn1/asn1c/NULL.c +++ b/src/asn1/asn1c/NULL.c @@ -24,7 +24,7 @@ asn_TYPE_operation_t asn_OP_NULL = { NULL_encode_der, /* Special handling of DER encoding */ NULL_encode_json, NULL_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_NULL = { "NULL", @@ -34,9 +34,9 @@ asn_TYPE_descriptor_t asn_DEF_NULL = { sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), asn_DEF_NULL_tags, /* Same as above */ sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), - { 0, 0, asn_generic_no_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, asn_generic_no_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; void @@ -81,8 +81,8 @@ NULL_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, /* * Check tags. */ - rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0, - &length, 0); + rval = ber_check_tags(opt_codec_ctx, td, NULL, buf_ptr, size, tag_mode, 0, + &length, NULL); if(rval.code != RC_OK) { return rval; } diff --git a/src/asn1/asn1c/Name.c b/src/asn1/asn1c/Name.c index 38a0daa0..eac1fd97 100644 --- a/src/asn1/asn1c/Name.c +++ b/src/asn1/asn1c/Name.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_Name_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_RDNSequence, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "rdnSequence" }, }; @@ -34,11 +34,11 @@ asn_TYPE_descriptor_t asn_DEF_Name = { "Name", "Name", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_Name_1, 1, /* Elements count */ &asn_SPC_Name_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/OBJECT_IDENTIFIER.c b/src/asn1/asn1c/OBJECT_IDENTIFIER.c index e3d0cb1a..e2a86942 100644 --- a/src/asn1/asn1c/OBJECT_IDENTIFIER.c +++ b/src/asn1/asn1c/OBJECT_IDENTIFIER.c @@ -30,7 +30,7 @@ asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = { der_encode_primitive, OBJECT_IDENTIFIER_encode_json, OBJECT_IDENTIFIER_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = { "OBJECT IDENTIFIER", @@ -42,9 +42,9 @@ asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = { asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */ sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), - { 0, 0, OBJECT_IDENTIFIER_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, OBJECT_IDENTIFIER_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; int diff --git a/src/asn1/asn1c/OCTET_STRING.c b/src/asn1/asn1c/OCTET_STRING.c index 247c1c4c..39a2746e 100644 --- a/src/asn1/asn1c/OCTET_STRING.c +++ b/src/asn1/asn1c/OCTET_STRING.c @@ -37,7 +37,7 @@ asn_TYPE_operation_t asn_OP_OCTET_STRING = { OCTET_STRING_encode_der, OCTET_STRING_encode_json, OCTET_STRING_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = { "OCTET STRING", /* Canonical name */ @@ -49,8 +49,8 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = { asn_DEF_OCTET_STRING_tags, /* Same as above */ sizeof(asn_DEF_OCTET_STRING_tags) / sizeof(asn_DEF_OCTET_STRING_tags[0]), - { 0, 0, asn_generic_no_constraint }, - 0, 0, /* No members */ + { NULL, NULL, asn_generic_no_constraint }, + NULL, 0, /* No members */ &asn_SPC_OCTET_STRING_specs }; @@ -182,7 +182,7 @@ OCTET_STRING_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, asn_struct_ctx_t *ctx; ssize_t consumed_myself = 0; struct _stack *stck; /* Expectations stack structure */ - struct _stack_el *sel = 0; /* Stack element */ + struct _stack_el *sel = NULL; /* Stack element */ int tlv_constr; enum asn_OS_Subvariant type_variant = specs->subvariant; @@ -271,7 +271,7 @@ OCTET_STRING_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, tlv_constr = 1; continue; } else { - sel = stck->cur_ptr = 0; + sel = stck->cur_ptr = NULL; break; /* Nothing to wait */ } } @@ -717,19 +717,21 @@ static const struct OCTET_STRING__xer_escape_table_s { OSXET("\074\151\163\063\057\076"), /* */ OSXET("\074\151\163\062\057\076"), /* */ OSXET("\074\151\163\061\057\076"), /* */ - { 0, 0 }, /* " " */ - { 0, 0 }, /* ! */ - { 0, 0 }, /* \" */ - { 0, 0 }, /* # */ - { 0, 0 }, /* $ */ - { 0, 0 }, /* % */ + { NULL, 0 }, /* " " */ + { NULL, 0 }, /* ! */ + { NULL, 0 }, /* \" */ + { NULL, 0 }, /* # */ + { NULL, 0 }, /* $ */ + { NULL, 0 }, /* % */ OSXET("\046\141\155\160\073"), /* & */ - { 0, 0 }, /* ' */ - {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* ()*+,-./ */ - {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* 01234567 */ - {0,0},{0,0},{0,0},{0,0}, /* 89:; */ - OSXET("\046\154\164\073"), /* < */ - { 0, 0 }, /* = */ + { NULL, 0 }, /* ' */ + {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* ()*+ */ + {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* ,-./ */ + {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* 0123 */ + {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* 4567 */ + {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* 89:; */ + OSXET("\046\154\164\073"), /* < */ + { NULL, 0 }, /* = */ OSXET("\046\147\164\073"), /* > */ }; @@ -856,7 +858,7 @@ OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, if(st->buf) { FREEMEM(st->buf); - st->buf = 0; + st->buf = NULL; } /* @@ -895,7 +897,7 @@ int OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) { void *buf; - if(st == 0 || (str == 0 && len)) { + if(st == NULL || (str == NULL && len)) { errno = EINVAL; return -1; } @@ -905,7 +907,7 @@ OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) { */ if(str == NULL) { FREEMEM(st->buf); - st->buf = 0; + st->buf = NULL; st->size = 0; return 0; } diff --git a/src/asn1/asn1c/OPEN_TYPE.c b/src/asn1/asn1c/OPEN_TYPE.c index 0ffe7cba..995f1d51 100644 --- a/src/asn1/asn1c/OPEN_TYPE.c +++ b/src/asn1/asn1c/OPEN_TYPE.c @@ -15,7 +15,7 @@ asn_TYPE_operation_t asn_OP_OPEN_TYPE = { OPEN_TYPE_encode_der, OPEN_TYPE_encode_json, OPEN_TYPE_encode_xer, - 0, /* Use generic outmost tag fetcher */ + NULL, /* Use generic outmost tag fetcher */ }; #undef ADVANCE diff --git a/src/asn1/asn1c/OtherRevocationInfoFormat.c b/src/asn1/asn1c/OtherRevocationInfoFormat.c index 50f5917c..ff2ea7e3 100644 --- a/src/asn1/asn1c/OtherRevocationInfoFormat.c +++ b/src/asn1/asn1c/OtherRevocationInfoFormat.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_OtherRevocationInfoFormat_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, &asn_DEF_OBJECT_IDENTIFIER, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "otherRevInfoFormat" }, { ATF_ANY_TYPE | ATF_NOFLAGS, 0, offsetof(struct OtherRevocationInfoFormat, otherRevInfo), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_ANY, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "otherRevInfo" }, }; @@ -50,7 +50,7 @@ asn_TYPE_descriptor_t asn_DEF_OtherRevocationInfoFormat = { asn_DEF_OtherRevocationInfoFormat_tags_1, /* Same as above */ sizeof(asn_DEF_OtherRevocationInfoFormat_tags_1) /sizeof(asn_DEF_OtherRevocationInfoFormat_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_OtherRevocationInfoFormat_1, 2, /* Elements count */ &asn_SPC_OtherRevocationInfoFormat_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/RDNSequence.c b/src/asn1/asn1c/RDNSequence.c index d5141400..129a8ec1 100644 --- a/src/asn1/asn1c/RDNSequence.c +++ b/src/asn1/asn1c/RDNSequence.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_RDNSequence_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, &asn_DEF_RelativeDistinguishedName, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_RDNSequence = { asn_DEF_RDNSequence_tags_1, /* Same as above */ sizeof(asn_DEF_RDNSequence_tags_1) /sizeof(asn_DEF_RDNSequence_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_RDNSequence_1, 1, /* Single element */ &asn_SPC_RDNSequence_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/ROAIPAddress.c b/src/asn1/asn1c/ROAIPAddress.c index 48aed1ce..481d6410 100644 --- a/src/asn1/asn1c/ROAIPAddress.c +++ b/src/asn1/asn1c/ROAIPAddress.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_ROAIPAddress_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_IPAddress, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "address" }, { ATF_POINTER, 1, offsetof(struct ROAIPAddress, maxLength), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_INTEGER, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "maxLength" }, }; @@ -51,7 +51,7 @@ asn_TYPE_descriptor_t asn_DEF_ROAIPAddress = { asn_DEF_ROAIPAddress_tags_1, /* Same as above */ sizeof(asn_DEF_ROAIPAddress_tags_1) /sizeof(asn_DEF_ROAIPAddress_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_ROAIPAddress_1, 2, /* Elements count */ &asn_SPC_ROAIPAddress_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/ROAIPAddressFamily.c b/src/asn1/asn1c/ROAIPAddressFamily.c index fbbcb7b6..29f1aa51 100644 --- a/src/asn1/asn1c/ROAIPAddressFamily.c +++ b/src/asn1/asn1c/ROAIPAddressFamily.c @@ -94,7 +94,7 @@ fail: json_decref(root); return NULL; } -json_t * +static json_t * ROAIPAddressFamily_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr) { struct ROAIPAddressFamily const *riaf = sptr; @@ -112,7 +112,7 @@ ROAIPAddressFamily_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr return SEQUENCE_encode_json(td, sptr); } -asn_TYPE_operation_t asn_OP_ROAIPAddressFamily = { +static asn_TYPE_operation_t asn_OP_ROAIPAddressFamily = { SEQUENCE_free, SEQUENCE_print, SEQUENCE_compare, @@ -120,7 +120,7 @@ asn_TYPE_operation_t asn_OP_ROAIPAddressFamily = { SEQUENCE_encode_der, ROAIPAddressFamily_encode_json, SEQUENCE_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; static int @@ -180,9 +180,9 @@ static asn_TYPE_member_t asn_MBR_addresses_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ROAIPAddress, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -205,7 +205,7 @@ asn_TYPE_descriptor_t asn_DEF_addresses_3 = { asn_DEF_addresses_tags_3, /* Same as above */ sizeof(asn_DEF_addresses_tags_3) /sizeof(asn_DEF_addresses_tags_3[0]), /* 1 */ - { NULL, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_addresses_3, 1, /* Single element */ &asn_SPC_addresses_specs_3 /* Additional specs */ @@ -216,18 +216,18 @@ asn_TYPE_member_t asn_MBR_ROAIPAddressFamily_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, - 0, - { NULL, 0, memb_addressFamily_constraint_1 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, memb_addressFamily_constraint_1 }, + NULL, NULL, /* No default value */ "addressFamily" }, { ATF_NOFLAGS, 0, offsetof(struct ROAIPAddressFamily, addresses), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_addresses_3, - 0, - { NULL, 0, memb_addresses_constraint_1 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, memb_addresses_constraint_1 }, + NULL, NULL, /* No default value */ "addresses" }, }; @@ -255,7 +255,7 @@ asn_TYPE_descriptor_t asn_DEF_ROAIPAddressFamily = { asn_DEF_ROAIPAddressFamily_tags_1, /* Same as above */ sizeof(asn_DEF_ROAIPAddressFamily_tags_1) /sizeof(asn_DEF_ROAIPAddressFamily_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_ROAIPAddressFamily_1, 2, /* Elements count */ &asn_SPC_ROAIPAddressFamily_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/RelativeDistinguishedName.c b/src/asn1/asn1c/RelativeDistinguishedName.c index 924b570b..d05cee72 100644 --- a/src/asn1/asn1c/RelativeDistinguishedName.c +++ b/src/asn1/asn1c/RelativeDistinguishedName.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_AttributeTypeAndValue, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName = { asn_DEF_RelativeDistinguishedName_tags_1, /* Same as above */ sizeof(asn_DEF_RelativeDistinguishedName_tags_1) /sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */ - { NULL, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_RelativeDistinguishedName_1, 1, /* Single element */ &asn_SPC_RelativeDistinguishedName_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/RevocationInfoChoice.c b/src/asn1/asn1c/RevocationInfoChoice.c index a30a974f..314c1588 100644 --- a/src/asn1/asn1c/RevocationInfoChoice.c +++ b/src/asn1/asn1c/RevocationInfoChoice.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_RevocationInfoChoice_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_CertificateList, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "crl" }, { ATF_NOFLAGS, 0, offsetof(struct RevocationInfoChoice, choice.other), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_OtherRevocationInfoFormat, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "other" }, }; @@ -44,11 +44,11 @@ asn_TYPE_descriptor_t asn_DEF_RevocationInfoChoice = { "RevocationInfoChoice", "RevocationInfoChoice", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_RevocationInfoChoice_1, 2, /* Elements count */ &asn_SPC_RevocationInfoChoice_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/RevocationInfoChoices.c b/src/asn1/asn1c/RevocationInfoChoices.c index 69a33e49..6b7d9fcf 100644 --- a/src/asn1/asn1c/RevocationInfoChoices.c +++ b/src/asn1/asn1c/RevocationInfoChoices.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_RevocationInfoChoices_1[] = { -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_RevocationInfoChoice, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_RevocationInfoChoices = { asn_DEF_RevocationInfoChoices_tags_1, /* Same as above */ sizeof(asn_DEF_RevocationInfoChoices_tags_1) /sizeof(asn_DEF_RevocationInfoChoices_tags_1[0]), /* 1 */ - { 0, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_RevocationInfoChoices_1, 1, /* Single element */ &asn_SPC_RevocationInfoChoices_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/RouteOriginAttestation.c b/src/asn1/asn1c/RouteOriginAttestation.c index ecaa7db5..a9c22f7f 100644 --- a/src/asn1/asn1c/RouteOriginAttestation.c +++ b/src/asn1/asn1c/RouteOriginAttestation.c @@ -64,9 +64,9 @@ static asn_TYPE_member_t asn_MBR_ipAddrBlocks_4[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ROAIPAddressFamily, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -89,7 +89,7 @@ asn_TYPE_descriptor_t asn_DEF_ipAddrBlocks_4 = { asn_DEF_ipAddrBlocks_tags_4, /* Same as above */ sizeof(asn_DEF_ipAddrBlocks_tags_4) /sizeof(asn_DEF_ipAddrBlocks_tags_4[0]), /* 1 */ - { NULL, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_ipAddrBlocks_4, 1, /* Single element */ &asn_SPC_ipAddrBlocks_specs_4 /* Additional specs */ @@ -100,8 +100,8 @@ static asn_TYPE_member_t asn_MBR_RouteOriginAttestation_1[] = { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_INTEGER, - 0, - { 0, 0, 0 }, + NULL, + { NULL, NULL, NULL }, &asn_DFL_2_cmp_0, /* Compare DEFAULT 0 */ &asn_DFL_2_set_0, /* Set DEFAULT 0 */ "version" @@ -110,18 +110,18 @@ static asn_TYPE_member_t asn_MBR_RouteOriginAttestation_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_ASId, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "asId" }, { ATF_NOFLAGS, 0, offsetof(struct RouteOriginAttestation, ipAddrBlocks), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_ipAddrBlocks_4, - 0, - { NULL, 0, memb_ipAddrBlocks_constraint_1 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, memb_ipAddrBlocks_constraint_1 }, + NULL, NULL, /* No default value */ "ipAddrBlocks" }, }; @@ -150,7 +150,7 @@ asn_TYPE_descriptor_t asn_DEF_RouteOriginAttestation = { asn_DEF_RouteOriginAttestation_tags_1, /* Same as above */ sizeof(asn_DEF_RouteOriginAttestation_tags_1) /sizeof(asn_DEF_RouteOriginAttestation_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_RouteOriginAttestation_1, 3, /* Elements count */ &asn_SPC_RouteOriginAttestation_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SignatureAlgorithmIdentifier.c b/src/asn1/asn1c/SignatureAlgorithmIdentifier.c index 98ef6351..bcf5b45e 100644 --- a/src/asn1/asn1c/SignatureAlgorithmIdentifier.c +++ b/src/asn1/asn1c/SignatureAlgorithmIdentifier.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_SignatureAlgorithmIdentifier = { asn_DEF_SignatureAlgorithmIdentifier_tags_1, /* Same as above */ sizeof(asn_DEF_SignatureAlgorithmIdentifier_tags_1) /sizeof(asn_DEF_SignatureAlgorithmIdentifier_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_AlgorithmIdentifier_1, 2, /* Elements count */ &asn_SPC_AlgorithmIdentifier_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SignatureValue.c b/src/asn1/asn1c/SignatureValue.c index e96ef741..2e9cc5a3 100644 --- a/src/asn1/asn1c/SignatureValue.c +++ b/src/asn1/asn1c/SignatureValue.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_SignatureValue = { asn_DEF_SignatureValue_tags_1, /* Same as above */ sizeof(asn_DEF_SignatureValue_tags_1) /sizeof(asn_DEF_SignatureValue_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ + { NULL, NULL, OCTET_STRING_constraint }, + NULL, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; diff --git a/src/asn1/asn1c/SignedAttributes.c b/src/asn1/asn1c/SignedAttributes.c index ef8f9f6c..0bba649b 100644 --- a/src/asn1/asn1c/SignedAttributes.c +++ b/src/asn1/asn1c/SignedAttributes.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_SignedAttributes_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_CMSAttribute, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_SignedAttributes = { asn_DEF_SignedAttributes_tags_1, /* Same as above */ sizeof(asn_DEF_SignedAttributes_tags_1) /sizeof(asn_DEF_SignedAttributes_tags_1[0]), /* 1 */ - { NULL, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_SignedAttributes_1, 1, /* Single element */ &asn_SPC_SignedAttributes_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SignedData.c b/src/asn1/asn1c/SignedData.c index 40ba0a40..cbea5f04 100644 --- a/src/asn1/asn1c/SignedData.c +++ b/src/asn1/asn1c/SignedData.c @@ -12,54 +12,54 @@ static asn_TYPE_member_t asn_MBR_SignedData_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_CMSVersion, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "version" }, { ATF_NOFLAGS, 0, offsetof(struct SignedData, digestAlgorithms), (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, &asn_DEF_DigestAlgorithmIdentifiers, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "digestAlgorithms" }, { ATF_NOFLAGS, 0, offsetof(struct SignedData, encapContentInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_EncapsulatedContentInfo, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "encapContentInfo" }, { ATF_POINTER, 2, offsetof(struct SignedData, certificates), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_CertificateSet, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "certificates" }, { ATF_POINTER, 1, offsetof(struct SignedData, crls), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_RevocationInfoChoices, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "crls" }, { ATF_NOFLAGS, 0, offsetof(struct SignedData, signerInfos), (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, &asn_DEF_SignerInfos, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signerInfos" }, }; @@ -91,7 +91,7 @@ asn_TYPE_descriptor_t asn_DEF_SignedData = { asn_DEF_SignedData_tags_1, /* Same as above */ sizeof(asn_DEF_SignedData_tags_1) /sizeof(asn_DEF_SignedData_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_SignedData_1, 6, /* Elements count */ &asn_SPC_SignedData_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SignedDataPKCS7.c b/src/asn1/asn1c/SignedDataPKCS7.c index 0bad7226..05919bd6 100644 --- a/src/asn1/asn1c/SignedDataPKCS7.c +++ b/src/asn1/asn1c/SignedDataPKCS7.c @@ -12,54 +12,54 @@ static asn_TYPE_member_t asn_MBR_SignedDataPKCS7_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_CMSVersion, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "version" }, { ATF_NOFLAGS, 0, offsetof(struct SignedDataPKCS7, digestAlgorithms), (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, &asn_DEF_DigestAlgorithmIdentifiers, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "digestAlgorithms" }, { ATF_NOFLAGS, 0, offsetof(struct SignedDataPKCS7, encapContentInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_EncapsulatedContentInfoPKCS7, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "encapContentInfo" }, { ATF_POINTER, 2, offsetof(struct SignedDataPKCS7, certificates), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_CertificateSet, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "certificates" }, { ATF_POINTER, 1, offsetof(struct SignedDataPKCS7, crls), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_RevocationInfoChoices, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "crls" }, { ATF_NOFLAGS, 0, offsetof(struct SignedDataPKCS7, signerInfos), (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, &asn_DEF_SignerInfos, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signerInfos" }, }; @@ -91,7 +91,7 @@ asn_TYPE_descriptor_t asn_DEF_SignedDataPKCS7 = { asn_DEF_SignedDataPKCS7_tags_1, /* Same as above */ sizeof(asn_DEF_SignedDataPKCS7_tags_1) /sizeof(asn_DEF_SignedDataPKCS7_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_SignedDataPKCS7_1, 6, /* Elements count */ &asn_SPC_SignedDataPKCS7_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SignerIdentifier.c b/src/asn1/asn1c/SignerIdentifier.c index cc07d791..c828146c 100644 --- a/src/asn1/asn1c/SignerIdentifier.c +++ b/src/asn1/asn1c/SignerIdentifier.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_SignerIdentifier_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_IssuerAndSerialNumber, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "issuerAndSerialNumber" }, { ATF_NOFLAGS, 0, offsetof(struct SignerIdentifier, choice.subjectKeyIdentifier), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_CMSSubjectKeyIdentifier, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "subjectKeyIdentifier" }, }; @@ -44,11 +44,11 @@ asn_TYPE_descriptor_t asn_DEF_SignerIdentifier = { "SignerIdentifier", "SignerIdentifier", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_SignerIdentifier_1, 2, /* Elements count */ &asn_SPC_SignerIdentifier_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SignerInfo.c b/src/asn1/asn1c/SignerInfo.c index c5fc63e4..399cb145 100644 --- a/src/asn1/asn1c/SignerInfo.c +++ b/src/asn1/asn1c/SignerInfo.c @@ -12,63 +12,63 @@ asn_TYPE_member_t asn_MBR_SignerInfo_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_CMSVersion, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "version" }, { ATF_NOFLAGS, 0, offsetof(struct SignerInfo, sid), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_SignerIdentifier, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "sid" }, { ATF_NOFLAGS, 0, offsetof(struct SignerInfo, digestAlgorithm), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_DigestAlgorithmIdentifier, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "digestAlgorithm" }, { ATF_POINTER, 1, offsetof(struct SignerInfo, signedAttrs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SignedAttributes, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signedAttrs" }, { ATF_NOFLAGS, 0, offsetof(struct SignerInfo, signatureAlgorithm), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_SignatureAlgorithmIdentifier, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signatureAlgorithm" }, { ATF_NOFLAGS, 0, offsetof(struct SignerInfo, signature), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_SignatureValue, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signature" }, { ATF_POINTER, 1, offsetof(struct SignerInfo, unsignedAttrs), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UnsignedAttributes, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "unsignedAttrs" }, }; @@ -102,7 +102,7 @@ asn_TYPE_descriptor_t asn_DEF_SignerInfo = { asn_DEF_SignerInfo_tags_1, /* Same as above */ sizeof(asn_DEF_SignerInfo_tags_1) /sizeof(asn_DEF_SignerInfo_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_SignerInfo_1, 7, /* Elements count */ &asn_SPC_SignerInfo_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SignerInfos.c b/src/asn1/asn1c/SignerInfos.c index deb7284f..8de20e16 100644 --- a/src/asn1/asn1c/SignerInfos.c +++ b/src/asn1/asn1c/SignerInfos.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_SignerInfos_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_SignerInfo, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_SignerInfos = { asn_DEF_SignerInfos_tags_1, /* Same as above */ sizeof(asn_DEF_SignerInfos_tags_1) /sizeof(asn_DEF_SignerInfos_tags_1[0]), /* 1 */ - { 0, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_SignerInfos_1, 1, /* Single element */ &asn_SPC_SignerInfos_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/SigningTime.c b/src/asn1/asn1c/SigningTime.c index 0b64cebd..0d6fc0af 100644 --- a/src/asn1/asn1c/SigningTime.c +++ b/src/asn1/asn1c/SigningTime.c @@ -15,11 +15,11 @@ asn_TYPE_descriptor_t asn_DEF_SigningTime = { "SigningTime", "SigningTime", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { 0, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_Time_1, 2, /* Elements count */ &asn_SPC_Time_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/TBSCertList.c b/src/asn1/asn1c/TBSCertList.c index b913ae03..31b25b02 100644 --- a/src/asn1/asn1c/TBSCertList.c +++ b/src/asn1/asn1c/TBSCertList.c @@ -12,27 +12,27 @@ static asn_TYPE_member_t asn_MBR_Member_8[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_CertificateSerialNumber, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "userCertificate" }, { ATF_NOFLAGS, 0, offsetof(struct TBSCertList__revokedCertificates__Member, revocationDate), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Time, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "revocationDate" }, { ATF_POINTER, 1, offsetof(struct TBSCertList__revokedCertificates__Member, crlEntryExtensions), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_Extensions, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "crlEntryExtensions" }, }; @@ -63,7 +63,7 @@ asn_TYPE_descriptor_t asn_DEF_Member_8 = { asn_DEF_Member_tags_8, /* Same as above */ sizeof(asn_DEF_Member_tags_8) /sizeof(asn_DEF_Member_tags_8[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_Member_8, 3, /* Elements count */ &asn_SPC_Member_specs_8 /* Additional specs */ @@ -74,9 +74,9 @@ static asn_TYPE_member_t asn_MBR_revokedCertificates_7[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_Member_8, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -99,7 +99,7 @@ asn_TYPE_descriptor_t asn_DEF_revokedCertificates_7 = { asn_DEF_revokedCertificates_tags_7, /* Same as above */ sizeof(asn_DEF_revokedCertificates_tags_7) /sizeof(asn_DEF_revokedCertificates_tags_7[0]), /* 1 */ - { 0, 0, SEQUENCE_OF_constraint }, + { NULL, NULL, SEQUENCE_OF_constraint }, asn_MBR_revokedCertificates_7, 1, /* Single element */ &asn_SPC_revokedCertificates_specs_7 /* Additional specs */ @@ -110,63 +110,63 @@ asn_TYPE_member_t asn_MBR_TBSCertList_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_Version, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "version" }, { ATF_NOFLAGS, 0, offsetof(struct TBSCertList, signature), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_AlgorithmIdentifier, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "signature" }, { ATF_NOFLAGS, 0, offsetof(struct TBSCertList, issuer), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Name, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "issuer" }, { ATF_NOFLAGS, 0, offsetof(struct TBSCertList, thisUpdate), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Time, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "thisUpdate" }, { ATF_POINTER, 3, offsetof(struct TBSCertList, nextUpdate), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_Time, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "nextUpdate" }, { ATF_POINTER, 2, offsetof(struct TBSCertList, revokedCertificates), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_revokedCertificates_7, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "revokedCertificates" }, { ATF_POINTER, 1, offsetof(struct TBSCertList, crlExtensions), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_Extensions, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "crlExtensions" }, }; @@ -201,7 +201,7 @@ asn_TYPE_descriptor_t asn_DEF_TBSCertList = { asn_DEF_TBSCertList_tags_1, /* Same as above */ sizeof(asn_DEF_TBSCertList_tags_1) /sizeof(asn_DEF_TBSCertList_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, + { NULL, NULL, SEQUENCE_constraint }, asn_MBR_TBSCertList_1, 7, /* Elements count */ &asn_SPC_TBSCertList_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/Time.c b/src/asn1/asn1c/Time.c index 2c867f30..eed8491d 100644 --- a/src/asn1/asn1c/Time.c +++ b/src/asn1/asn1c/Time.c @@ -12,18 +12,18 @@ asn_TYPE_member_t asn_MBR_Time_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (23 << 2)), 0, &asn_DEF_UTCTime, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "utcTime" }, { ATF_NOFLAGS, 0, offsetof(struct Time, choice.generalTime), (ASN_TAG_CLASS_UNIVERSAL | (24 << 2)), 0, &asn_DEF_GeneralizedTime, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "generalTime" }, }; @@ -44,11 +44,11 @@ asn_TYPE_descriptor_t asn_DEF_Time = { "Time", "Time", &asn_OP_CHOICE, - 0, /* No effective tags (pointer) */ + NULL, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ - 0, /* No tags (pointer) */ + NULL, /* No tags (pointer) */ 0, /* No tags (count) */ - { NULL, 0, CHOICE_constraint }, + { NULL, NULL, CHOICE_constraint }, asn_MBR_Time_1, 2, /* Elements count */ &asn_SPC_Time_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/UTCTime.c b/src/asn1/asn1c/UTCTime.c index f3ba02ab..7382879a 100644 --- a/src/asn1/asn1c/UTCTime.c +++ b/src/asn1/asn1c/UTCTime.c @@ -31,7 +31,7 @@ asn_TYPE_operation_t asn_OP_UTCTime = { OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ UTCTime_encode_json, UTCTime_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_UTCTime = { "UTCTime", @@ -43,9 +43,9 @@ asn_TYPE_descriptor_t asn_DEF_UTCTime = { asn_DEF_UTCTime_tags, sizeof(asn_DEF_UTCTime_tags) / sizeof(asn_DEF_UTCTime_tags[0]), - { 0, NULL, UTCTime_constraint }, - 0, 0, /* No members */ - 0 /* No specifics */ + { NULL, NULL, UTCTime_constraint }, + NULL, 0, /* No members */ + NULL /* No specifics */ }; #endif /* ASN___INTERNAL_TEST_MODE */ @@ -62,7 +62,7 @@ UTCTime_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, fprintf(stderr, "UTCTime_constraint() is not implemented for now.\n"); abort(); - if(asn_UT2time(st, 0) != 0) { + if(asn_UT2time(st, NULL) != 0) { ASN__CTFAIL(app_key, td, sptr, "%s: Invalid time format: %s (%s:%d)", td->name, strerror(errno), __FILE__, __LINE__); return -1; @@ -86,7 +86,7 @@ UTCTime_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, ASN__ENCODE_FAILED; /* Fractions are not allowed in UTCTime */ - ut = asn_time2UT(0, &tm); + ut = asn_time2UT(NULL, &tm); if(!ut) ASN__ENCODE_FAILED; rv = OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags, @@ -177,7 +177,7 @@ asn_time2UT(UTCTime_t *opt_ut, const struct tm *tm) { GeneralizedTime_t *gt = (GeneralizedTime_t *)opt_ut; gt = asn_time2GT(gt, tm); - if(gt == 0) return 0; + if(gt == NULL) return NULL; assert(gt->size >= 2); gt->size -= 2; @@ -203,10 +203,10 @@ UTCTime_compare(const asn_TYPE_descriptor_t *td, const void *aptr, int aerr, berr; errno = EPERM; - at = asn_UT2time(a, 0); + at = asn_UT2time(a, NULL); aerr = errno; errno = EPERM; - bt = asn_UT2time(b, 0); + bt = asn_UT2time(b, NULL); berr = errno; if(at == -1 && aerr != EPERM) { diff --git a/src/asn1/asn1c/UnsignedAttributes.c b/src/asn1/asn1c/UnsignedAttributes.c index 3e12d61b..28c4bfe6 100644 --- a/src/asn1/asn1c/UnsignedAttributes.c +++ b/src/asn1/asn1c/UnsignedAttributes.c @@ -12,9 +12,9 @@ asn_TYPE_member_t asn_MBR_UnsignedAttributes_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_CMSAttribute, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ + NULL, + { NULL, NULL, NULL }, + NULL, NULL, /* No default value */ "" }, }; @@ -36,7 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_UnsignedAttributes = { asn_DEF_UnsignedAttributes_tags_1, /* Same as above */ sizeof(asn_DEF_UnsignedAttributes_tags_1) /sizeof(asn_DEF_UnsignedAttributes_tags_1[0]), /* 1 */ - { NULL, 0, SET_OF_constraint }, + { NULL, NULL, SET_OF_constraint }, asn_MBR_UnsignedAttributes_1, 1, /* Single element */ &asn_SPC_UnsignedAttributes_specs_1 /* Additional specs */ diff --git a/src/asn1/asn1c/Version.c b/src/asn1/asn1c/Version.c index 61a60839..3fd1ad4c 100644 --- a/src/asn1/asn1c/Version.c +++ b/src/asn1/asn1c/Version.c @@ -24,7 +24,7 @@ asn_TYPE_descriptor_t asn_DEF_Version = { asn_DEF_Version_tags_1, /* Same as above */ sizeof(asn_DEF_Version_tags_1) /sizeof(asn_DEF_Version_tags_1[0]), /* 1 */ - { 0, 0, INTEGER_constraint }, - 0, 0, /* Defined elsewhere */ - 0 /* No specifics */ + { NULL, NULL, INTEGER_constraint }, + NULL, 0, /* Defined elsewhere */ + NULL /* No specifics */ }; diff --git a/src/asn1/asn1c/asn_SEQUENCE_OF.c b/src/asn1/asn1c/asn_SEQUENCE_OF.c index 640cf764..39f873a8 100644 --- a/src/asn1/asn1c/asn_SEQUENCE_OF.c +++ b/src/asn1/asn1c/asn_SEQUENCE_OF.c @@ -4,6 +4,11 @@ */ #include "asn1/asn1c/asn_SEQUENCE_OF.h" +#include +#include +#include +#include + typedef A_SEQUENCE_OF(void) asn_sequence; void @@ -20,7 +25,7 @@ asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free) { if(_do_free && as->free) { ptr = as->array[number]; } else { - ptr = 0; + ptr = NULL; } /* diff --git a/src/asn1/asn1c/asn_SET_OF.c b/src/asn1/asn1c/asn_SET_OF.c index cffea4a9..a29e4c67 100644 --- a/src/asn1/asn1c/asn_SET_OF.c +++ b/src/asn1/asn1c/asn_SET_OF.c @@ -15,7 +15,7 @@ int asn_set_add(void *asn_set_of_x, void *ptr) { asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); - if(as == 0 || ptr == 0) { + if(as == NULL || ptr == NULL) { errno = EINVAL; /* Invalid arguments */ return -1; } @@ -53,7 +53,7 @@ asn_set_del(void *asn_set_of_x, int number, int _do_free) { if(_do_free && as->free) { ptr = as->array[number]; } else { - ptr = 0; + ptr = NULL; } as->array[number] = as->array[--as->count]; @@ -80,7 +80,7 @@ asn_set_empty(void *asn_set_of_x) { as->free(as->array[as->count]); } FREEMEM(as->array); - as->array = 0; + as->array = NULL; } as->count = 0; as->size = 0; diff --git a/src/asn1/asn1c/asn_codecs.h b/src/asn1/asn1c/asn_codecs.h index 0b3519ab..cd720108 100644 --- a/src/asn1/asn1c/asn_codecs.h +++ b/src/asn1/asn1c/asn_codecs.h @@ -87,8 +87,8 @@ typedef struct asn_enc_rval_s { return tmp_error; \ } while(0) #define ASN__ENCODED_OK(rval) do { \ - rval.structure_ptr = 0; \ - rval.failed_type = 0; \ + rval.structure_ptr = NULL; \ + rval.failed_type = NULL; \ return rval; \ } while(0) diff --git a/src/asn1/asn1c/asn_codecs_prim.c b/src/asn1/asn1c/asn_codecs_prim.c index d1616092..51062230 100644 --- a/src/asn1/asn1c/asn_codecs_prim.c +++ b/src/asn1/asn1c/asn_codecs_prim.c @@ -36,8 +36,8 @@ ber_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, /* * Check tags and extract value length. */ - rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, - tag_mode, 0, &length, 0); + rval = ber_check_tags(opt_codec_ctx, td, NULL, buf_ptr, size, + tag_mode, 0, &length, NULL); if(rval.code != RC_OK) return rval; diff --git a/src/asn1/asn1c/ber_tlv_tag.c b/src/asn1/asn1c/ber_tlv_tag.c index 2380f945..c52b01e8 100644 --- a/src/asn1/asn1c/ber_tlv_tag.c +++ b/src/asn1/asn1c/ber_tlv_tag.c @@ -75,7 +75,7 @@ ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *f) { ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t size) { - const char *type = 0; + const char *type = NULL; int ret; switch(tag & 0x3) { diff --git a/src/asn1/asn1c/constr_CHOICE.c b/src/asn1/asn1c/constr_CHOICE.c index 2efec8fe..f74a14fe 100644 --- a/src/asn1/asn1c/constr_CHOICE.c +++ b/src/asn1/asn1c/constr_CHOICE.c @@ -135,9 +135,9 @@ CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, /* * Create the target structure if it is not present already. */ - if(st == 0) { + if(st == NULL) { st = *struct_ptr = CALLOC(1, specs->struct_size); - if(st == 0) { + if(st == NULL) { RETURN(RC_FAIL); } } @@ -160,7 +160,7 @@ CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, if(tag_mode || td->tags_count) { rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, - tag_mode, -1, &ctx->left, 0); + tag_mode, -1, &ctx->left, NULL); if(rval.code != RC_OK) { ASN_DEBUG("%s tagging check failed: %d", td->name, rval.code); @@ -425,7 +425,7 @@ CHOICE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, /* Encode member with its tag */ erval = elm->type->op->der_encoder(elm->type, memb_ptr, - elm->tag_mode, elm->tag, 0, 0); + elm->tag_mode, elm->tag, NULL, NULL); if(erval.encoded == -1) return erval; diff --git a/src/asn1/asn1c/constr_SEQUENCE.c b/src/asn1/asn1c/constr_SEQUENCE.c index d2342eab..5702b238 100644 --- a/src/asn1/asn1c/constr_SEQUENCE.c +++ b/src/asn1/asn1c/constr_SEQUENCE.c @@ -143,9 +143,9 @@ SEQUENCE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, /* * Create the target structure if it is not present already. */ - if(st == 0) { + if(st == NULL) { st = *struct_ptr = CALLOC(1, specs->struct_size); - if(st == 0) { + if(st == NULL) { RETURN(RC_FAIL); } } @@ -167,7 +167,7 @@ SEQUENCE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, */ rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, - tag_mode, 1, &ctx->left, 0); + tag_mode, 1, &ctx->left, NULL); if(rval.code != RC_OK) { ASN_DEBUG("%s tagging check failed: %d", td->name, rval.code); @@ -319,7 +319,7 @@ SEQUENCE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, specs->tag2el, specs->tag2el_count, sizeof(specs->tag2el[0]), _t2e_cmp); if(t2m) { - const asn_TYPE_tag2member_t *best = 0; + const asn_TYPE_tag2member_t *best = NULL; const asn_TYPE_tag2member_t *t2m_f, *t2m_l; size_t edx_max = edx + elements[edx].optional; /* @@ -558,7 +558,7 @@ SEQUENCE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, erval = elm->type->op->der_encoder(elm->type, *memb_ptr2, elm->tag_mode, elm->tag, - 0, 0); + NULL, NULL); if(erval.encoded == -1) return erval; computed_size += erval.encoded; @@ -659,8 +659,8 @@ SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; int xcan = (flags & XER_F_CANONICAL); - asn_TYPE_descriptor_t *tmp_def_val_td = 0; - void *tmp_def_val = 0; + asn_TYPE_descriptor_t *tmp_def_val_td = NULL; + void *tmp_def_val = NULL; size_t edx; if(!sptr) ASN__ENCODE_FAILED; @@ -676,7 +676,7 @@ SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, memb_ptr = get_member(sptr, elm); if(!memb_ptr) { - assert(tmp_def_val == 0); + assert(tmp_def_val == NULL); if(elm->default_value_set) { if(elm->default_value_set(&tmp_def_val)) { ASN__ENCODE_FAILED; @@ -700,7 +700,7 @@ SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, flags, cb, app_key); if(tmp_def_val) { ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val); - tmp_def_val = 0; + tmp_def_val = NULL; } if(tmper.encoded == -1) return tmper; er.encoded += tmper.encoded; @@ -899,5 +899,5 @@ asn_TYPE_operation_t asn_OP_SEQUENCE = { SEQUENCE_encode_der, SEQUENCE_encode_json, SEQUENCE_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; diff --git a/src/asn1/asn1c/constr_SEQUENCE_OF.c b/src/asn1/asn1c/constr_SEQUENCE_OF.c index 117e0291..4e6e9915 100644 --- a/src/asn1/asn1c/constr_SEQUENCE_OF.c +++ b/src/asn1/asn1c/constr_SEQUENCE_OF.c @@ -34,7 +34,7 @@ SEQUENCE_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, if(!memb_ptr) continue; erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, - 0, 0); + NULL, NULL); if(erval.encoded == -1) return erval; computed_size += erval.encoded; @@ -83,8 +83,8 @@ SEQUENCE_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, erval.structure_ptr = ptr; } else { erval.encoded = computed_size; - erval.structure_ptr = 0; - erval.failed_type = 0; + erval.structure_ptr = NULL; + erval.failed_type = NULL; } return erval; @@ -99,7 +99,7 @@ SEQUENCE_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, const asn_TYPE_member_t *elm = td->elements; const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(sptr); const char *mname = specs->as_XMLValueList - ? 0 + ? NULL : ((*elm->name) ? elm->name : elm->type->xml_tag); size_t mlen = mname ? strlen(mname) : 0; int xcan = (flags & XER_F_CANONICAL); @@ -179,5 +179,5 @@ asn_TYPE_operation_t asn_OP_SEQUENCE_OF = { SEQUENCE_OF_encode_der, SEQUENCE_OF_encode_json, SEQUENCE_OF_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; diff --git a/src/asn1/asn1c/constr_SET_OF.c b/src/asn1/asn1c/constr_SET_OF.c index e4a01a5b..d58a731a 100644 --- a/src/asn1/asn1c/constr_SET_OF.c +++ b/src/asn1/asn1c/constr_SET_OF.c @@ -100,9 +100,9 @@ SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, /* * Create the target structure if it is not present already. */ - if(st == 0) { + if(st == NULL) { st = *struct_ptr = CALLOC(1, specs->struct_size); - if(st == 0) { + if(st == NULL) { RETURN(RC_FAIL); } } @@ -124,7 +124,7 @@ SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, */ rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, - tag_mode, 1, &ctx->left, 0); + tag_mode, 1, &ctx->left, NULL); if(rval.code != RC_OK) { ASN_DEBUG("%s tagging check failed: %d", td->name, rval.code); @@ -227,7 +227,7 @@ SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, if(ASN_SET_ADD(list, ctx->ptr) != 0) RETURN(RC_FAIL); else - ctx->ptr = 0; + ctx->ptr = NULL; } break; case RC_WMORE: /* More data expected */ @@ -238,7 +238,7 @@ SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, /* Fall through */ case RC_FAIL: /* Fatal error */ ASN_STRUCT_FREE(*elm->type, ctx->ptr); - ctx->ptr = 0; + ctx->ptr = NULL; RETURN(RC_FAIL); } /* switch(rval) */ @@ -438,7 +438,7 @@ SET_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, if(!memb_ptr) ASN__ENCODE_FAILED; erval = - elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, 0, 0); + elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, NULL, NULL); if(erval.encoded == -1) return erval; computed_size += erval.encoded; } @@ -572,10 +572,10 @@ SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, const asn_TYPE_member_t *elm = td->elements; const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); const char *mname = specs->as_XMLValueList - ? 0 : ((*elm->name) ? elm->name : elm->type->xml_tag); + ? NULL : ((*elm->name) ? elm->name : elm->type->xml_tag); size_t mlen = mname ? strlen(mname) : 0; int xcan = (flags & XER_F_CANONICAL); - xer_tmp_enc_t *encs = 0; + xer_tmp_enc_t *encs = NULL; size_t encs_count = 0; void *original_app_key = app_key; asn_app_consume_bytes_f *original_cb = cb; @@ -642,7 +642,7 @@ SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, for(; enc < end; enc++) { ASN__CALLBACK(enc->buffer, enc->offset); FREEMEM(enc->buffer); - enc->buffer = 0; + enc->buffer = NULL; control_size += enc->offset; } assert(control_size == er.encoded); @@ -721,7 +721,7 @@ SET_OF_free(const asn_TYPE_descriptor_t *td, void *ptr, ctx = (asn_struct_ctx_t *)((char *)ptr + specs->ctx_offset); if(ctx->ptr) { ASN_STRUCT_FREE(*elm->type, ctx->ptr); - ctx->ptr = 0; + ctx->ptr = NULL; } switch(method) { @@ -860,5 +860,5 @@ asn_TYPE_operation_t asn_OP_SET_OF = { SET_OF_encode_der, SET_OF_encode_json, SET_OF_encode_xer, - 0 /* Use generic outmost tag fetcher */ + NULL /* Use generic outmost tag fetcher */ }; diff --git a/src/asn1/asn1c/constraints.c b/src/asn1/asn1c/constraints.c index f3dffc6d..f96883e4 100644 --- a/src/asn1/asn1c/constraints.c +++ b/src/asn1/asn1c/constraints.c @@ -80,8 +80,8 @@ asn_check_constraints(const asn_TYPE_descriptor_t *type_descriptor, struct errbufDesc arg; int ret; - arg.failed_type = 0; - arg.failed_struct_ptr = 0; + arg.failed_type = NULL; + arg.failed_struct_ptr = NULL; arg.errbuf = errbuf; arg.errlen = errlen ? *errlen : 0; diff --git a/src/asn1/asn1c/der_encoder.c b/src/asn1/asn1c/der_encoder.c index 58621076..b3aa0e7e 100644 --- a/src/asn1/asn1c/der_encoder.c +++ b/src/asn1/asn1c/der_encoder.c @@ -134,7 +134,7 @@ der_write_tags(const asn_TYPE_descriptor_t *sd, size_t struct_length, */ overall_length = struct_length; for(i = tags_count - 1; i >= 0; --i) { - lens[i] = der_write_TL(tags[i], overall_length, 0, 0, 0); + lens[i] = der_write_TL(tags[i], overall_length, NULL, NULL, 0); if(lens[i] == -1) return -1; overall_length += lens[i]; lens[i] = overall_length - lens[i]; diff --git a/src/asn1/asn1c/xer_encoder.c b/src/asn1/asn1c/xer_encoder.c index 6b7a864e..a3d189d3 100644 --- a/src/asn1/asn1c/xer_encoder.c +++ b/src/asn1/asn1c/xer_encoder.c @@ -13,7 +13,7 @@ asn_enc_rval_t xer_encode(const asn_TYPE_descriptor_t *td, const void *sptr, enum xer_encoder_flags_e xer_flags, asn_app_consume_bytes_f *cb, void *app_key) { - asn_enc_rval_t er = {0, 0, 0}; + asn_enc_rval_t er = { 0 }; asn_enc_rval_t tmper; const char *mname; size_t mlen;