summaryrefslogtreecommitdiff
path: root/lib/parser_aux.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-09-13 21:30:33 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-09-13 21:30:33 +0200
commit4b8b8ccb3e96c4de1409f9ce701b870a53a2b720 (patch)
tree28c1a7496e856539b76b4c079ba8187dd6908593 /lib/parser_aux.c
parent94976d02fb6f3205ae2a05dfa6069bedfe1b547a (diff)
downloadlibtasn1-4b8b8ccb3e96c4de1409f9ce701b870a53a2b720.tar.gz
libtasn1-4b8b8ccb3e96c4de1409f9ce701b870a53a2b720.tar.bz2
libtasn1-4b8b8ccb3e96c4de1409f9ce701b870a53a2b720.zip
Eliminated _asn1_malloc, _asn1_free and _asn_calloc.
Diffstat (limited to 'lib/parser_aux.c')
-rw-r--r--lib/parser_aux.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/parser_aux.c b/lib/parser_aux.c
index 83de603..d5f3166 100644
--- a/lib/parser_aux.c
+++ b/lib/parser_aux.c
@@ -57,14 +57,14 @@ _asn1_add_node (unsigned int type)
list_type *listElement;
ASN1_TYPE punt;
- punt = (ASN1_TYPE) _asn1_calloc (1, sizeof (struct node_asn_struct));
+ punt = calloc (1, sizeof (struct node_asn_struct));
if (punt == NULL)
return NULL;
- listElement = (list_type *) _asn1_malloc (sizeof (list_type));
+ listElement = malloc (sizeof (list_type));
if (listElement == NULL)
{
- _asn1_free (punt);
+ free (punt);
return NULL;
}
@@ -204,7 +204,7 @@ _asn1_set_value (ASN1_TYPE node, const void *value, unsigned int len)
if (node->value)
{
if (node->value != node->small_value)
- _asn1_free (node->value);
+ free (node->value);
node->value = NULL;
node->value_len = 0;
}
@@ -218,7 +218,7 @@ _asn1_set_value (ASN1_TYPE node, const void *value, unsigned int len)
}
else
{
- node->value = _asn1_malloc (len);
+ node->value = malloc (len);
if (node->value == NULL)
return NULL;
}
@@ -249,7 +249,7 @@ _asn1_set_value_octet (ASN1_TYPE node, const void *value, unsigned int len)
return node;
asn1_length_der (len, NULL, &len2);
- temp = (unsigned char *) _asn1_malloc (len + len2);
+ temp = malloc (len + len2);
if (temp == NULL)
return NULL;
@@ -269,7 +269,7 @@ _asn1_set_value_m (ASN1_TYPE node, void *value, unsigned int len)
if (node->value)
{
if (node->value != node->small_value)
- _asn1_free (node->value);
+ free (node->value);
node->value = NULL;
node->value_len = 0;
}
@@ -303,7 +303,7 @@ _asn1_append_value (ASN1_TYPE node, const void *value, unsigned int len)
/* value is allocated */
int prev_len = node->value_len;
node->value_len += len;
- node->value = _asn1_realloc (node->value, node->value_len);
+ node->value = realloc (node->value, node->value_len);
if (node->value == NULL)
{
node->value_len = 0;
@@ -318,7 +318,7 @@ _asn1_append_value (ASN1_TYPE node, const void *value, unsigned int len)
/* value is in node */
int prev_len = node->value_len;
node->value_len += len;
- node->value = _asn1_malloc (node->value_len);
+ node->value = malloc (node->value_len);
if (node->value == NULL)
{
node->value_len = 0;
@@ -415,8 +415,8 @@ _asn1_remove_node (ASN1_TYPE node)
return;
if (node->value != NULL && node->value != node->small_value)
- _asn1_free (node->value);
- _asn1_free (node);
+ free (node->value);
+ free (node);
}
/******************************************************************/
@@ -456,7 +456,7 @@ _asn1_delete_list (void)
{
listElement = firstElement;
firstElement = firstElement->next;
- _asn1_free (listElement);
+ free (listElement);
}
}
@@ -475,7 +475,7 @@ _asn1_delete_list_and_nodes (void)
listElement = firstElement;
firstElement = firstElement->next;
_asn1_remove_node (listElement->node);
- _asn1_free (listElement);
+ free (listElement);
}
}