~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to lib/records/RecTree.cc

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-12-17 22:28:16 UTC
  • mfrom: (5.1.8 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121217222816-7xwjsx5k76zkb63d
Tags: 3.2.0-1ubuntu1
* Revert FreeBSD strerror_r() fixes that give errors with glibc 2.16.
* Apply patch from Konstantinos Margaritis to define barriers on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
num_leaf(0)
41
41
{
42
42
  if (t) {
43
 
    node_name = xstrdup(t);
 
43
    node_name = ats_strdup(t);
44
44
  } else {
45
 
    node_name = xstrdup("root");
 
45
    node_name = ats_strdup("root");
46
46
  }
47
47
}
48
48
 
50
50
 
51
51
RecTreeNode::~RecTreeNode()
52
52
{
53
 
  if (node_name) {
54
 
    xfree(node_name);
55
 
  }
 
53
  ats_free(node_name);
56
54
}
57
55
 
58
56
/**
238
236
    RecTreeDebug("RecTreeGetList subtree %s has %d leafs\n", subtree->this_node->node_name, (*count));
239
237
  }
240
238
 
241
 
  *buf = (char **) xmalloc(sizeof(char *) * (*count));
 
239
  *buf = (char **)ats_malloc(sizeof(char *) * (*count));
242
240
  for (i = 0; i < (*count); i++) {
243
 
    (*buf)[i] = (char *) xmalloc(sizeof(char));
 
241
    (*buf)[i] = (char *)ats_malloc(sizeof(char));
244
242
  }
245
243
 
246
244
  int index = 0;