ASN1_TYPE
_asn1_add_node (unsigned int type)
{
  list_type *listElement;
  ASN1_TYPE punt;

  punt = (ASN1_TYPE) _asn1_calloc (1, sizeof (struct node_asn_struct));
  if (punt == NULL)
    return NULL;

  listElement = (list_type *) _asn1_malloc (sizeof (list_type));
  if (listElement == NULL)
    {
      _asn1_free (punt);
      return NULL;
    }

  listElement->node = punt;
  listElement->next = firstElement;
  firstElement = listElement;

  punt->type = type;

  return punt;
}
Example #2
0
node_asn *
_asn1_add_node (unsigned int type)
{
  list_type *listElement;
  node_asn *punt;

  punt = (node_asn *) _asn1_calloc (1, sizeof (node_asn));
  if (punt == NULL)
    return NULL;

  listElement = (list_type *) _asn1_malloc (sizeof (list_type));
  if (listElement == NULL)
    {
      _asn1_free (punt);
      return NULL;
    }

  listElement->node = punt;
  listElement->next = firstElement;
  firstElement = listElement;

  punt->type = type;

  return punt;
}
Example #3
0
ASN1_TYPE
_asn1_add_node_only (unsigned int type)
{
  ASN1_TYPE punt;

  punt = (ASN1_TYPE) _asn1_calloc (1, sizeof (struct node_asn_struct));
  if (punt == NULL)
    return NULL;

  punt->type = type;

  return punt;
}