diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-03-02 14:51:04 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-03-02 14:51:04 +0000 |
commit | 9991973c373321fd7903a552f06dcb3ff576ad1f (patch) | |
tree | d0566a8853d835782e92c96d527ea1a382f9df09 /asn1 | |
parent | 240af26981370328011b319f570b10bc4f61f4a7 (diff) |
Use explicit casts.
svn path=/trunk/; revision=48008
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/p1/p1.cnf | 10 | ||||
-rw-r--r-- | asn1/pkcs12/packet-pkcs12-template.c | 6 | ||||
-rw-r--r-- | asn1/t38/packet-t38-template.c | 16 | ||||
-rw-r--r-- | asn1/x509af/x509af.cnf | 4 | ||||
-rw-r--r-- | asn1/x509if/x509if.cnf | 12 | ||||
-rw-r--r-- | asn1/x509sat/x509sat.cnf | 4 |
6 files changed, 26 insertions, 26 deletions
diff --git a/asn1/p1/p1.cnf b/asn1/p1/p1.cnf index 17b0cb03c5..a16c540d2b 100644 --- a/asn1/p1/p1.cnf +++ b/asn1/p1/p1.cnf @@ -938,7 +938,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" #.FN_BODY TeletexDomainDefinedAttribute - ddatype = ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; + ddatype = (char *)ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; %(DEFAULT_BODY)s @@ -1047,13 +1047,13 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" } #.FN_BODY BuiltInDomainDefinedAttribute - ddatype = ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; + ddatype = (char *)ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0'; %(DEFAULT_BODY)s #.FN_BODY ORAddress - oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; doing_address = TRUE; address_item = NULL; @@ -1066,7 +1066,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" #.FN_BODY ORName - oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; address_item = NULL; doing_address = TRUE; @@ -1085,7 +1085,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token" #.FN_BODY GlobalDomainIdentifier - oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; + oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0'; address_item = tree; %(DEFAULT_BODY)s diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c index 964fa0a8cb..6bb98a5fb4 100644 --- a/asn1/pkcs12/packet-pkcs12-template.c +++ b/asn1/pkcs12/packet-pkcs12-template.c @@ -268,14 +268,14 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted } /* allocate buffers */ - key = ep_alloc(keylen); + key = (char *)ep_alloc(keylen); if(!generate_key_or_iv(1 /*LEY */, salt, iteration_count, password, keylen, key)) return FALSE; if(ivlen) { - iv = ep_alloc(ivlen); + iv = (char *)ep_alloc(ivlen); if(!generate_key_or_iv(2 /* IV */, salt, iteration_count, password, ivlen, iv)) return FALSE; @@ -301,7 +301,7 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted } datalen = tvb_length(encrypted_tvb); - clear_data = g_malloc(datalen); + clear_data = (char *)g_malloc(datalen); err = gcry_cipher_decrypt (cipher, clear_data, datalen, tvb_get_ephemeral_string(encrypted_tvb, 0, datalen), datalen); if (gcry_err_code (err)) { diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c index f72fe6d5b4..cbe63ea50a 100644 --- a/asn1/t38/packet-t38-template.c +++ b/asn1/t38/packet-t38-template.c @@ -252,14 +252,14 @@ void t38_add_address(packet_info *pinfo, /* * Check if the conversation has data associated with it. */ - p_conversation_data = conversation_get_proto_data(p_conversation, proto_t38); + p_conversation_data = (t38_conv*)conversation_get_proto_data(p_conversation, proto_t38); /* * If not, add a new data item. */ if ( ! p_conversation_data ) { /* Create conversation data */ - p_conversation_data = se_alloc(sizeof(t38_conv)); + p_conversation_data = se_new(t38_conv); conversation_add_proto_data(p_conversation, proto_t38, p_conversation_data); } @@ -303,7 +303,7 @@ force_reassemble_seq(packet_info *pinfo, guint32 id, key.dst = pinfo->dst; key.id = id; - fd_head = g_hash_table_lookup(fragment_table, &key); + fd_head = (fragment_data *)g_hash_table_lookup(fragment_table, &key); /* have we already seen this frame ?*/ if (pinfo->fd->flags.visited) { @@ -344,7 +344,7 @@ force_reassemble_seq(packet_info *pinfo, guint32 id, } last_fd=fd_i; } - fd_head->data = g_malloc(size); + fd_head->data = (char *)g_malloc(size); fd_head->len = size; /* record size for caller */ /* add all data fragments */ @@ -425,7 +425,7 @@ init_t38_info_conv(packet_info *pinfo) p_t38_conv = NULL; /* Use existing packet info if available */ - p_t38_packet_conv = p_get_proto_data(pinfo->fd, proto_t38); + p_t38_packet_conv = (t38_conv *)p_get_proto_data(pinfo->fd, proto_t38); /* find the conversation used for Reassemble and Setup Info */ @@ -443,11 +443,11 @@ init_t38_info_conv(packet_info *pinfo) } if (!p_t38_packet_conv) { - p_t38_conv = conversation_get_proto_data(p_conv, proto_t38); + p_t38_conv = (t38_conv *)conversation_get_proto_data(p_conv, proto_t38); /* create the conversation if it doen't exist */ if (!p_t38_conv) { - p_t38_conv = se_alloc(sizeof(t38_conv)); + p_t38_conv = se_new(t38_conv); p_t38_conv->setup_method[0] = '\0'; p_t38_conv->setup_frame_number = 0; @@ -475,7 +475,7 @@ init_t38_info_conv(packet_info *pinfo) } /* copy the t38 conversation info to the packet t38 conversation */ - p_t38_packet_conv = se_alloc(sizeof(t38_conv)); + p_t38_packet_conv = se_new(t38_conv); g_strlcpy(p_t38_packet_conv->setup_method, p_t38_conv->setup_method, MAX_T38_SETUP_METHOD_SIZE); p_t38_packet_conv->setup_frame_number = p_t38_conv->setup_frame_number; diff --git a/asn1/x509af/x509af.cnf b/asn1/x509af/x509af.cnf index 8e4408f5b5..48acb47a2a 100644 --- a/asn1/x509af/x509af.cnf +++ b/asn1/x509af/x509af.cnf @@ -96,12 +96,12 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate } #.FN_BODY Extension/extnValue - gint8 class; + gint8 ber_class; gboolean pc, ind; gint32 tag; guint32 len; /* skip past the T and L */ - offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag); + offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag); offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind); offset=call_ber_oid_callback(extension_id, tvb, offset, actx->pinfo, tree); diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf index 7a2cf78e46..68a0cb7cb9 100644 --- a/asn1/x509if/x509if.cnf +++ b/asn1/x509if/x509if.cnf @@ -212,7 +212,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" if((fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) { /* we have a format */ - last_ava = ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s", name, fmt); @@ -257,7 +257,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" /* we have a format */ if (!last_ava) { - last_ava = ep_alloc(MAX_AVA_STR_LEN); + last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); } if(!(name = oid_resolved_from_string(object_identifier_id))) @@ -334,7 +334,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" rdn_one_value = FALSE; top_of_rdn = tree; - last_rdn = ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0'; + last_rdn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); %(DEFAULT_BODY)s @@ -345,7 +345,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" /* now append this to the DN */ if (last_dn) { if(*last_dn) { - temp_dn = ep_alloc(MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ + temp_dn = (char *)ep_alloc(MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ g_snprintf(temp_dn, MAX_DN_STR_LEN, "%%s,%%s", last_rdn, last_dn); last_dn[0] = '\0'; g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN); @@ -375,7 +375,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" const char *fmt; dn_one_rdn = FALSE; /* reset */ - last_dn = ep_alloc(MAX_DN_STR_LEN); *last_dn = '\0'; + last_dn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_dn = '\0'; top_of_dn = NULL; register_frame_end_routine (actx->pinfo, x509if_frame_end); @@ -407,7 +407,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" #.FN_BODY AttributeValueAssertion ava_hf_index = hf_index; - last_ava = ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); %(DEFAULT_BODY)s diff --git a/asn1/x509sat/x509sat.cnf b/asn1/x509sat/x509sat.cnf index dfb560302f..d88df7f4f4 100644 --- a/asn1/x509sat/x509sat.cnf +++ b/asn1/x509sat/x509sat.cnf @@ -391,14 +391,14 @@ XDayOf/fifth fifth_dayof #.END #.FN_BODY GUID - gint8 class; + gint8 ber_class; gboolean pc; gint32 tag; guint32 len; e_guid_t uuid; if(!implicit_tag){ - offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag); + offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag); offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL); } else { gint32 remaining=tvb_length_remaining(tvb, offset); |